diff --git a/src/WebSocketServer.cpp b/src/WebSocketServer.cpp index 864492b1..8627dbeb 100644 --- a/src/WebSocketServer.cpp +++ b/src/WebSocketServer.cpp @@ -122,13 +122,11 @@ void WebSocketServer::Stop() _threadPool.waitForDone(); - // This can deadlock the thread that it is running on. Bad but kinda required. + // This can delay the thread that it is running on. Bad but kinda required. while (_sessions.size() > 0) { std::this_thread::sleep_for(std::chrono::milliseconds(10)); } - _server.stop(); - _serverThread.join(); blog(LOG_INFO, "[Stop] Server stopped successfully");