Closed ojii closed 7 years ago
Now:
Does it auto-reconnect after that error?
I tried TimeoutError
case and both are working properly after that error.
Okay, now I can reproduce the old problem. If there's concurrent connections, the old one will not auto-reconnect:
ERROR:tornado.access:500 POST /push_message (127.0.0.1) 60000.75ms
ERROR:asyncio:Fatal read error on socket transport
protocol: <asyncio.sslproto.SSLProtocol object at 0x10d1f0748>
transport: <_SelectorSocketTransport fd=9 read=polling write=<idle, bufsize=0>>
Traceback (most recent call last):
File "/usr/local/Cellar/python3/3.6.1/Frameworks/Python.framework/Versions/3.6/lib/python3.6/asyncio/selector_events.py", line 724, in _read_ready
data = self._sock.recv(self.max_size)
TimeoutError: [Errno 60] Operation timed out
ERROR:asyncio:Exception in callback APNSProtocol.connection_lost(TimeoutError(...on timed out'))
handle: <Handle APNSProtocol.connection_lost(TimeoutError(...on timed out'))>
Traceback (most recent call last):
File "/usr/local/Cellar/python3/3.6.1/Frameworks/Python.framework/Versions/3.6/lib/python3.6/asyncio/events.py", line 127, in _run
self._callback(*self._args)
File "/Users/iskandarsetiadi/Documents/shobosso-unreadchecker/venv/lib/python3.6/site-packages/aapns-1.0.0.dev7-py3.6.egg/aapns/connection.py", line 101, in connection_lost
pending.future.set_exception(Disconnected())
asyncio.base_futures.InvalidStateError: invalid state
WARNING:root:[AAPNS] Timeout Error sending ios push
ERROR:tornado.access:500 POST /push_message (127.0.0.1) 60002.98ms
WARNING:root:[AAPNS] Timeout Error sending ios push
ERROR:tornado.access:500 POST /push_message (127.0.0.1) 59999.83ms
The new one looks good:
ERROR:tornado.access:500 POST /push_message (127.0.0.1) 60002.84ms
ERROR:asyncio:Fatal read error on socket transport
protocol: <asyncio.sslproto.SSLProtocol object at 0x10e311f28>
transport: <_SelectorSocketTransport fd=13 read=polling write=<idle, bufsize=0>>
Traceback (most recent call last):
File "/usr/local/Cellar/python3/3.6.1/Frameworks/Python.framework/Versions/3.6/lib/python3.6/asyncio/selector_events.py", line 724, in _read_ready
data = self._sock.recv(self.max_size)
TimeoutError: [Errno 60] Operation timed out
WARNING:root:[AAPNS] Disconnected:
ERROR:tornado.access:500 POST /push_message (127.0.0.1) 66650.01ms
INFO:root:[HSBP] Pushed Notification to iOS, ...
INFO:tornado.access:200 POST /push_message (127.0.0.1) 600.80ms
Now:
Before:
But I still cannot reproduce the infinite broken state after
InvalidStateError
exception 🤔 The next push notification still works properly