fix(multi): prevent player kick on slow load and background tab throttling

This commit is contained in:
jessy-david-dev
2026-04-11 22:12:39 +02:00
parent 6be8db9145
commit 1153f574a4
2 changed files with 27 additions and 2 deletions
+2 -2
View File
@@ -44,8 +44,8 @@ function generatePlayerId(): string {
return crypto.randomUUID();
}
// Timeout joueur inactif : 15s
const PLAYER_TIMEOUT_MS = 15_000;
// Timeout joueur inactif : 45s (heartbeat toutes les 2s, on laisse large pour les tabs en arrière-plan)
const PLAYER_TIMEOUT_MS = 45_000;
function prunePlayers(players: Player[]): Player[] {
const now = Date.now();