Merge branch 'leth-patch-1'
This commit is contained in:
commit
88bf4c0bcc
1 changed files with 13 additions and 16 deletions
|
|
@ -175,24 +175,21 @@ class SocketIO(object):
|
||||||
"""
|
"""
|
||||||
warning_screen = _yield_warning_screen(seconds)
|
warning_screen = _yield_warning_screen(seconds)
|
||||||
for elapsed_time in warning_screen:
|
for elapsed_time in warning_screen:
|
||||||
|
if self._stop_waiting(for_callbacks):
|
||||||
|
break
|
||||||
try:
|
try:
|
||||||
if self._stop_waiting(for_callbacks):
|
|
||||||
break
|
|
||||||
try:
|
try:
|
||||||
try:
|
self._process_events()
|
||||||
self._process_events()
|
except TimeoutError:
|
||||||
except TimeoutError:
|
pass
|
||||||
pass
|
self.heartbeat_pacemaker.send(elapsed_time)
|
||||||
self.heartbeat_pacemaker.send(elapsed_time)
|
except ConnectionError as e:
|
||||||
except ConnectionError as e:
|
try:
|
||||||
try:
|
warning = Exception('[connection error] %s' % e)
|
||||||
warning = Exception('[connection error] %s' % e)
|
warning_screen.throw(warning)
|
||||||
warning_screen.throw(warning)
|
except StopIteration:
|
||||||
except StopIteration:
|
_log.warn(warning)
|
||||||
_log.warn(warning)
|
self.disconnect()
|
||||||
self.disconnect()
|
|
||||||
except KeyboardInterrupt:
|
|
||||||
pass
|
|
||||||
|
|
||||||
def _process_events(self):
|
def _process_events(self):
|
||||||
for packet in self._transport.recv_packet():
|
for packet in self._transport.recv_packet():
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue