fixed #253
This commit is contained in:
@@ -5,6 +5,7 @@ ChangeLog
|
|||||||
- Exclude port 443 from host http header (#248)
|
- Exclude port 443 from host http header (#248)
|
||||||
- Cleanup code (#249)
|
- Cleanup code (#249)
|
||||||
- Modify a code block directive in README (#250)
|
- Modify a code block directive in README (#250)
|
||||||
|
- fixed ping/pong timeouet (#253)
|
||||||
|
|
||||||
- 0.37.0
|
- 0.37.0
|
||||||
- fixed failure that `websocket.create_connection` does not accept `origin` as a parameter (#246 )
|
- fixed failure that `websocket.create_connection` does not accept `origin` as a parameter (#246 )
|
||||||
|
@@ -220,7 +220,7 @@ class WebSocketApp(object):
|
|||||||
self._callback(self.on_message, data)
|
self._callback(self.on_message, data)
|
||||||
|
|
||||||
if ping_timeout and self.last_ping_tm \
|
if ping_timeout and self.last_ping_tm \
|
||||||
and self.last_ping_tm - time.time() > ping_timeout \
|
and time.time() - self.last_ping_tm > ping_timeout \
|
||||||
and self.last_ping_tm - self.last_pong_tm > ping_timeout:
|
and self.last_ping_tm - self.last_pong_tm > ping_timeout:
|
||||||
raise WebSocketTimeoutException("ping/pong timed out")
|
raise WebSocketTimeoutException("ping/pong timed out")
|
||||||
except (Exception, KeyboardInterrupt, SystemExit) as e:
|
except (Exception, KeyboardInterrupt, SystemExit) as e:
|
||||||
|
Reference in New Issue
Block a user