[Fix] 修复一个BUG:websocket在发送ping包时出错将不会重连,导致后续每ping一次报一次错。

This commit is contained in:
nanoric 2018-11-05 22:55:08 -04:00
parent 541c4b6f76
commit fe51b1aa5e

View File

@ -191,6 +191,7 @@ class WebsocketClient(object):
et, ev, tb = sys.exc_info()
# todo: just log this, notifying user is not necessary
self.onError(et, ev, tb)
self._reconnect()
for i in range(60):
if not self._active:
break