fix ping race condition
This commit is contained in:
parent
76fe11741a
commit
5f703a043b
@ -216,6 +216,9 @@ class WebSocketConnection(object):
|
|||||||
|
|
||||||
def resetPing(self):
|
def resetPing(self):
|
||||||
self.cancelPing()
|
self.cancelPing()
|
||||||
|
if not self.open:
|
||||||
|
logger.debug("resetPing() while closed. passing...")
|
||||||
|
return
|
||||||
self.pingTimer = threading.Timer(30, self.sendPing)
|
self.pingTimer = threading.Timer(30, self.sendPing)
|
||||||
self.pingTimer.start()
|
self.pingTimer.start()
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user