From 82f3b71209b6176d10786592352410a9a0e258e4 Mon Sep 17 00:00:00 2001 From: Joel AZEMAR Date: Wed, 20 Oct 2010 11:39:21 +0200 Subject: [PATCH 1/2] Add Errno::ECONNRESET --- lib/apnserver/server.rb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/apnserver/server.rb b/lib/apnserver/server.rb index 60cc6c5..2503fb6 100644 --- a/lib/apnserver/server.rb +++ b/lib/apnserver/server.rb @@ -25,7 +25,7 @@ def start! begin @client.connect! unless @client.connected? @client.write(notification) - rescue Errno::EPIPE, OpenSSL::SSL::SSLError + rescue Errno::EPIPE, OpenSSL::SSL::SSLError, Errno::ECONNRESET puts "Caught Error, closing connecting and adding notification back to queue" @client.disconnect! @queue.push(notification) From 876b13fcb50c4e97167600f3b91030ecb35d0c40 Mon Sep 17 00:00:00 2001 From: Joel AZEMAR Date: Wed, 20 Oct 2010 15:39:59 +0200 Subject: [PATCH 2/2] Add Large Exception Catch --- lib/apnserver/server.rb | 2 ++ 1 file changed, 2 insertions(+) diff --git a/lib/apnserver/server.rb b/lib/apnserver/server.rb index 2503fb6..582abfb 100644 --- a/lib/apnserver/server.rb +++ b/lib/apnserver/server.rb @@ -31,6 +31,8 @@ def start! @queue.push(notification) rescue RuntimeError => e puts "Unable to handle: #{e}" + rescue Exception => e + puts "Unable to handle: #{e}" end end end