From cabd220a665b0eab60a2441c69bd442338c65fc6 Mon Sep 17 00:00:00 2001 From: Xiphoseer Date: Tue, 8 Feb 2022 17:25:14 +0100 Subject: [PATCH] Fix spam-log on master disconnect (#447) --- dWorldServer/WorldServer.cpp | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/dWorldServer/WorldServer.cpp b/dWorldServer/WorldServer.cpp index bc7e1418..ba6c6c71 100644 --- a/dWorldServer/WorldServer.cpp +++ b/dWorldServer/WorldServer.cpp @@ -313,8 +313,9 @@ int main(int argc, char** argv) { if (!Game::server->GetIsConnectedToMaster()) { framesSinceMasterDisconnect++; - if (framesSinceMasterDisconnect >= 30) { - Game::logger->Log("WorldServer", "Game loop running but no connection to master for 30 frames, shutting down"); + int framesToWaitForMaster = ready ? 10 : 200; + if (framesSinceMasterDisconnect >= framesToWaitForMaster && !worldShutdownSequenceStarted) { + Game::logger->Log("WorldServer", "Game loop running but no connection to master for %d frames, shutting down\n", framesToWaitForMaster); worldShutdownSequenceStarted = true; } }