diff --git a/src/server/GameServer.ts b/src/server/GameServer.ts index 68b7012e5..b652e11e3 100644 --- a/src/server/GameServer.ts +++ b/src/server/GameServer.ts @@ -35,8 +35,7 @@ export class GameServer { private maxGameDuration = 3 * 60 * 60 * 1000; // 3 hours - private disconnectionTimeout = 1 * 60 * 1000; // 1 minute - private inactivityTimeout = 3 * 60 * 1000; // 3 minute + private idleTimeout = 1 * 60 * 1000; // 1 minute private turns: Turn[] = []; private intents: Intent[] = []; @@ -552,14 +551,14 @@ export class GameServer { for (const [clientID, client] of this.allClients) { if ( client.isIdle === false && - (now - client.lastPing > this.disconnectionTimeout || - now - client.lastAction > this.inactivityTimeout) + now - client.lastPing > this.idleTimeout && + now - client.lastAction > this.idleTimeout ) { this.markClientIdle(client, true); } else if ( client.isIdle && - now - client.lastPing < this.disconnectionTimeout && - now - client.lastAction < this.inactivityTimeout + now - client.lastPing < this.idleTimeout && + now - client.lastAction < this.idleTimeout ) { this.markClientIdle(client, false); }