Lawouach / WebSocket-for-Python

WebSocket client and server library for Python 2 and 3 as well as PyPy (ws4py 0.5.1)
https://ws4py.readthedocs.org/en/latest/
BSD 3-Clause "New" or "Revised" License
1.12k stars 288 forks source link

WebSocketManager: how to gracefully close and join all threaded WebSocketClients? #225

Open kroitor opened 7 years ago

kroitor commented 7 years ago

When I do manager.close_all () it starts the closing sequence. If I do manager.join () it blocks and waits for the manager thread to stop. But the manager is never waiting for all managed client threads to stop and corresponding closed () callbacks are never called. How do I make the manager wait for (or join) all threaded clients to close completely and stop gracefully?