From cdc56f31916faef233a019bd87907f07831f4515 Mon Sep 17 00:00:00 2001 From: Evan Date: Tue, 15 Apr 2025 12:21:31 -0700 Subject: [PATCH] don't archive game if it hasn't started --- src/server/GameServer.ts | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/src/server/GameServer.ts b/src/server/GameServer.ts index 41d74a92b..9cbd712c2 100644 --- a/src/server/GameServer.ts +++ b/src/server/GameServer.ts @@ -356,7 +356,11 @@ export class GameServer { client.ws.close(1000, "game has ended"); } }); - this.log.info("ending game", { gameID: this.id, turns: this.turns.length }); + if (!this._hasPrestarted || !this._hasStarted) { + this.log.info(`game not started, not archiving game`); + return; + } + this.log.info(`ending game with ${this.turns.length} turns`); try { if (this.allClients.size > 0) { const playerRecords: PlayerRecord[] = Array.from(