Fix spam-log on master disconnect (#447)

This commit is contained in:
Xiphoseer 2022-02-08 17:25:14 +01:00 committed by GitHub
parent d9874b452e
commit cabd220a66
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -313,8 +313,9 @@ int main(int argc, char** argv) {
if (!Game::server->GetIsConnectedToMaster()) { if (!Game::server->GetIsConnectedToMaster()) {
framesSinceMasterDisconnect++; framesSinceMasterDisconnect++;
if (framesSinceMasterDisconnect >= 30) { int framesToWaitForMaster = ready ? 10 : 200;
Game::logger->Log("WorldServer", "Game loop running but no connection to master for 30 frames, shutting down"); 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; worldShutdownSequenceStarted = true;
} }
} }