diff --git a/src/ServerMainloop.cpp b/src/ServerMainloop.cpp index 1f496a51..2c88a06b 100644 --- a/src/ServerMainloop.cpp +++ b/src/ServerMainloop.cpp @@ -41,6 +41,7 @@ void ServerMainloop::run() { double delta = targetDelta; auto begin = system_clock::now(); auto startupTime = begin; + while (process->isActive()) { if (engine.isQuitSignal()) { process->terminate(); @@ -65,7 +66,7 @@ void ServerMainloop::run() { auto end = system_clock::now(); platform::sleep(targetDelta * 1000 - duration_cast(end - begin).count() / 1000); - begin = end; + begin = system_clock::now(); } } logger.info() << "test finished";