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:
+1
-1
@@ -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);
|
||||
}, []);
|
||||
|
||||
|
||||
Reference in New Issue
Block a user