fix(multi): prevent host pruning and increase timeout to 90s

- Exempt host from inactivity pruning to prevent room corruption
- Increase player timeout from 45s to 90s for slower connections
- Reduce heartbeat interval from 20s to 15s for better coverage
- Refresh all players' lastSeen on nextRound/resetGame to avoid immediate pruning
This commit is contained in:
jessy-david-dev
2026-04-17 15:35:13 +02:00
parent 2e2d22fc39
commit 08f67ee4f5
4 changed files with 20 additions and 15 deletions
+1 -1
View File
@@ -116,7 +116,7 @@ export function useMultiGame() {
headers: { "Content-Type": "application/json" },
body: JSON.stringify({ action: "heartbeat", playerId: ssePidRef.current }),
}).catch(() => {});
}, 20_000);
}, 15_000);
return () => clearInterval(id);
}, []);