diff --git a/src/simple_websocket/ws.py b/src/simple_websocket/ws.py index 627f53d..b57f754 100644 --- a/src/simple_websocket/ws.py +++ b/src/simple_websocket/ws.py @@ -143,6 +143,7 @@ def _thread(self): if not self.pong_received: self.close(reason=CloseReason.POLICY_VIOLATION, message='Ping/Pong timeout') + self.event.set() break self.pong_received = False self.sock.send(self.ws.send(Ping()))