djacobs/PyAPNs — pull request #32 by kernys (2013-05-14 03:09:03+00:00)
Title: Fixed for SSL handshake timeout

Sometimes when APNS trying to reconnect to server, Socket timeout or
SSL handshake timeout error happened. This fixed the problem by
allowing 3 times both reconnection and hand-shakes.

File "tasks/apns.py", line 144, in _connection
self._connect()
File "tasks/apns.py", line 135, in _connect
self._ssl = wrap_socket(self._socket, self.key_file, self.cert_file)
File
"/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/ssl.py"
, line 381, in wrap_socket
ciphers=ciphers)
File
"/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/ssl.py"
, line 143, in __init__
self.do_handshake()
File
"/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/ssl.py"
, line 305, in do_handshake
self._sslobj.do_handshake()
SSLError: _ssl.c:489: The handshake operation timed out