It seems that stop() doesn't close the websocket
Skywalker13 opened this issue · comments
Hello,
We have a websocket server where the websocket stays alive even after a call on stop()
. The socket is really closed only when the process is terminated.
Any ideas? It should be like eidheim/Simple-Web-Server#86 ?! no ?!
Thanks
Thank you, I also noticed that stop() is not thread safe here: https://github.com/eidheim/Simple-WebSocket-Server/blob/master/server_ws.hpp#L302. Will look into why the socket is kept alive even after stop() is called.
Let me know if the above commit fixes your use case. Thank you again.
Thanks, what about stop()
on the client side ? https://github.com/eidheim/Simple-WebSocket-Server/blob/master/client_ws.hpp#L191
Sorry for the late response, I realised I had to read up on this a bit. Especially with respect to the Simple-Web-Server project where the client sockets are not stored anywhere, and still a way is needed to close all the sockets when calling stop(). I'll get around to this soon.