From 680be038098f45be04c2a43e27abe17fd6939bd9 Mon Sep 17 00:00:00 2001 From: Ryan Barlow Date: Wed, 4 Feb 2026 20:52:59 +0000 Subject: [PATCH] abort before creating the WebSocket connection if the user already left --- src/client/Main.ts | 13 ++----------- 1 file changed, 2 insertions(+), 11 deletions(-) diff --git a/src/client/Main.ts b/src/client/Main.ts index 0d6e5cdae..b4bae397b 100644 --- a/src/client/Main.ts +++ b/src/client/Main.ts @@ -769,12 +769,6 @@ class Client { } const config = await getServerConfigFromClient(); - // Check if this join was superseded by another - if (this.joinAttemptId !== thisAttemptId) { - console.log("Join attempt superseded, aborting"); - return; - } - // Only update URL immediately for private lobbies, not public ones if (lobby.source !== "public") { this.updateJoinUrlForShare(lobby.gameID, config); @@ -783,12 +777,9 @@ class Client { const pattern = this.userSettings.getSelectedPatternName( await fetchCosmetics(), ); - if (this.joinAttemptId !== thisAttemptId) { - console.log("Join attempt superseded, aborting"); - return; - } - const turnstileToken = await this.getTurnstileToken(lobby); + + // Check if this join was superseded (user left or started another join) if (this.joinAttemptId !== thisAttemptId) { console.log("Join attempt superseded, aborting"); return;