From eafc5ff96a0bb311960e5e58477555d254bbad87 Mon Sep 17 00:00:00 2001 From: Ryan Barlow Date: Wed, 4 Feb 2026 20:28:11 +0000 Subject: [PATCH] joinAttemptId++ on handleLeaveLobby --- src/client/Main.ts | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/src/client/Main.ts b/src/client/Main.ts index cfadf1c9a..82f5c516a 100644 --- a/src/client/Main.ts +++ b/src/client/Main.ts @@ -922,7 +922,11 @@ class Client { } private async handleLeaveLobby(/* event: CustomEvent */) { + // Abort any in-progress join attempt (before joinLobby() was called) + this.joinAttemptId++; + if (this.gameStop === null) { + console.log("leaving lobby, no active game to stop"); return; } console.log("leaving lobby, cancelling game");