From d3c763237787b06f0336ed11c8000d1cb8b40954 Mon Sep 17 00:00:00 2001 From: botbikamordehai2-sketch Date: Thu, 28 May 2026 07:53:51 +0000 Subject: [PATCH] fix: run_forever() now waits for thread completion before returning (closes #152) --- ws4py/client/threadedclient.py | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/ws4py/client/threadedclient.py b/ws4py/client/threadedclient.py index b033f32..c4d3305 100644 --- a/ws4py/client/threadedclient.py +++ b/ws4py/client/threadedclient.py @@ -55,8 +55,7 @@ def run_forever(self): Simply blocks the thread until the websocket has terminated. """ - while not self.terminated: - self._th.join(timeout=0.1) + self._th.join() def handshake_ok(self): """