WebSocketServer: Don't call stop() on the server

For some reason I thought I was supposed to call it /shrug
This commit is contained in:
tt2468 2021-04-28 12:36:15 -07:00
parent af7a539e84
commit 0be9174bb1

View File

@ -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");