bugfix: ranked 1v1 did not set the start time, so the game started immediately before players had time to join

This commit is contained in:
evanpelle
2026-02-20 13:32:36 -06:00
parent 07b5d6e41f
commit b865e0af8f
+6 -7
View File
@@ -566,13 +566,12 @@ async function startMatchmakingPolling(gm: GameManager) {
log.info(`Lobby poll successful:`, data);
if (data.assignment) {
const gameConfig = playlist.get1v1Config();
const game = gm.createGame(gameId, gameConfig);
setTimeout(() => {
// Wait a few seconds to allow clients to connect.
console.log(`Starting game ${gameId}`);
game.start();
}, 7000);
gm.createGame(
gameId,
playlist.get1v1Config(),
undefined,
Date.now() + 7000,
);
}
} catch (error) {
if (error instanceof Error && error.name === "AbortError") {