lib/apnserver/server.rb in bpoweski-apnserver-0.1.6 vs lib/apnserver/server.rb in bpoweski-apnserver-0.1.7

- old
+ new

@@ -26,9 +26,13 @@ @client.connect! unless @client.connected? @client.write(notification) rescue Errno::EPIPE puts "Caught Errno::EPIPE adding notification back to queue" @queue.push(notification) + rescue OpenSSL::SSL::SSLError + puts "Caught OpenSSL Error, closing connecting and adding notification back to queue" + @client.disconnect! + @queue.push(notification) end end end end end