Skip to content

Commit 4b3825f

Browse files
committed
fix: server thread lifetime
1 parent c0d5144 commit 4b3825f

File tree

1 file changed

+3
-0
lines changed

1 file changed

+3
-0
lines changed

GhostServer/networkmanager.cpp

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -194,6 +194,9 @@ void NetworkManager::StopServer()
194194
{
195195
if (this->isRunning) {
196196
this->isRunning = false;
197+
if (this->serverThread.joinable()) {
198+
this->serverThread.join();
199+
}
197200
return;
198201
}
199202

0 commit comments

Comments
 (0)