mirror of
https://github.com/vcmi/vcmi.git
synced 2025-06-23 00:28:08 +02:00
Fix crash on closing client while server is active
This commit is contained in:
@ -108,9 +108,14 @@ public:
|
||||
|
||||
CServerHandler::~CServerHandler()
|
||||
{
|
||||
if (serverRunner)
|
||||
serverRunner->shutdown();
|
||||
networkHandler->stop();
|
||||
try
|
||||
{
|
||||
if (serverRunner)
|
||||
serverRunner->wait();
|
||||
serverRunner.reset();
|
||||
threadNetwork.join();
|
||||
}
|
||||
catch (const std::runtime_error & e)
|
||||
|
Reference in New Issue
Block a user