mirror of
https://github.com/Palakis/obs-websocket.git
synced 2025-07-25 11:02:36 +00:00
WebSocketServer: Fix shutdown order
This commit is contained in:
@ -107,8 +107,6 @@ void WebSocketServer::Stop()
|
||||
}
|
||||
lock.unlock();
|
||||
|
||||
_server.stop();
|
||||
|
||||
_threadPool.waitForDone();
|
||||
|
||||
// This can deadlock the thread that it is running on. Bad but kinda required.
|
||||
@ -116,6 +114,8 @@ void WebSocketServer::Stop()
|
||||
std::this_thread::sleep_for(std::chrono::milliseconds(10));
|
||||
}
|
||||
|
||||
_server.stop();
|
||||
|
||||
_serverThread.join();
|
||||
|
||||
blog(LOG_INFO, "Server stopped successfully");
|
||||
|
Reference in New Issue
Block a user