Exit server stk process if STKHost no longer exists
This commit is contained in:
parent
11b9897f88
commit
d60b087c25
@ -414,6 +414,8 @@ void MainLoop::run()
|
||||
|
||||
// Shutdown next frame if shutdown request is sent while loading the
|
||||
// world
|
||||
bool was_server = NetworkConfig::get()->isNetworking() &&
|
||||
NetworkConfig::get()->isServer();
|
||||
if ((STKHost::existHost() && STKHost::get()->requestedShutdown()) ||
|
||||
m_request_abort)
|
||||
{
|
||||
@ -467,7 +469,6 @@ void MainLoop::run()
|
||||
NetworkConfig::get()->getResetScreens().data());
|
||||
MessageQueue::add(MessageQueue::MT_ERROR, msg);
|
||||
}
|
||||
|
||||
NetworkConfig::get()->unsetNetworking();
|
||||
}
|
||||
|
||||
@ -477,6 +478,9 @@ void MainLoop::run()
|
||||
}
|
||||
}
|
||||
|
||||
if (was_server && !STKHost::existHost())
|
||||
m_abort = true;
|
||||
|
||||
if (!m_abort)
|
||||
{
|
||||
float frame_duration = num_steps * dt;
|
||||
|
Loading…
x
Reference in New Issue
Block a user