diff --git a/src/main_loop.cpp b/src/main_loop.cpp index 1e0c9d919..ca71e0480 100644 --- a/src/main_loop.cpp +++ b/src/main_loop.cpp @@ -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;