mirror of
https://github.com/Palakis/obs-websocket.git
synced 2024-08-30 18:12:16 +00:00
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:
parent
af7a539e84
commit
0be9174bb1
@ -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");
|
||||
|
Loading…
Reference in New Issue
Block a user