bpoweski-apnserver 0.1.6 → 0.1.7

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -17,7 +17,7 @@ h2. Remaining Tasks
17
17
 
18
18
  h2. Issues Fixed
19
19
 
20
- * first attempt at retry logic for a notification
20
+ * second attempt at retry logic, SSL Errors close down sockets now
21
21
  * apnsend --badge option correctly sends integer number rather than string of number for aps json payload
22
22
  * connections are propery closed in Notification#push method now
23
23
 
data/VERSION CHANGED
@@ -1 +1 @@
1
- 0.1.6
1
+ 0.1.7
@@ -28,6 +28,8 @@ module ApnServer
28
28
  def disconnect!
29
29
  @ssl.close
30
30
  @sock.close
31
+ @ssl = nil
32
+ @sock = nil
31
33
  end
32
34
 
33
35
  def write(notification)
@@ -28,6 +28,10 @@ module ApnServer
28
28
  rescue Errno::EPIPE
29
29
  puts "Caught Errno::EPIPE adding notification back to queue"
30
30
  @queue.push(notification)
31
+ rescue OpenSSL::SSL::SSLError
32
+ puts "Caught OpenSSL Error, closing connecting and adding notification back to queue"
33
+ @client.disconnect!
34
+ @queue.push(notification)
31
35
  end
32
36
  end
33
37
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: bpoweski-apnserver
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.1.6
4
+ version: 0.1.7
5
5
  platform: ruby
6
6
  authors:
7
7
  - Ben Poweski
@@ -9,7 +9,7 @@ autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
11
 
12
- date: 2009-09-22 00:00:00 -07:00
12
+ date: 2009-09-27 00:00:00 -07:00
13
13
  default_executable:
14
14
  dependencies:
15
15
  - !ruby/object:Gem::Dependency