mirror of
https://github.com/vcmi/vcmi.git
synced 2024-12-24 22:14:36 +02:00
Fix crash on closing client while server is active
This commit is contained in:
parent
763e18d202
commit
74f9b03516
@ -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)
|
||||
|
Loading…
Reference in New Issue
Block a user