mirror of
https://github.com/Palakis/obs-websocket.git
synced 2024-08-30 18:12:16 +00:00
WebSocketServer: Fix shutdown order
This commit is contained in:
parent
5348c80aa8
commit
e2d837958f
@ -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");
|
||||
|
Loading…
Reference in New Issue
Block a user