diff --git a/ixwebsocket/IXWebSocketServer.cpp b/ixwebsocket/IXWebSocketServer.cpp index 996fa497..3778f09e 100644 --- a/ixwebsocket/IXWebSocketServer.cpp +++ b/ixwebsocket/IXWebSocketServer.cpp @@ -130,6 +130,8 @@ namespace ix // FIXME: we should cancel all the async per connections tasks void WebSocketServer::stop() { + if (!_thread.joinable()) return; // nothing to do + _stop = true; _thread.join(); _stop = false;