From b864dfb0569bf66fbda07a52000e6e15b18325ca Mon Sep 17 00:00:00 2001 From: Henry Jameson Date: Tue, 1 Sep 2026 18:14:08 +0300 Subject: [PATCH 1/4] whoops --- src/stores/users.js | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/src/stores/users.js b/src/stores/users.js index d3c8ad6cf..7c87d4f7f 100644 --- a/src/stores/users.js +++ b/src/stores/users.js @@ -274,9 +274,8 @@ export const useUsersStore = defineStore('users', { map.set(identifier, promise) - const result = await promise - try { + const result = await promise if (result) { const { id, screen_name } = result From 7b037ef60f91dc5760bebbc38ed1edffe61b8d22 Mon Sep 17 00:00:00 2001 From: Henry Jameson Date: Tue, 1 Sep 2026 18:21:27 +0300 Subject: [PATCH 2/4] invert check --- src/stores/streaming.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/stores/streaming.js b/src/stores/streaming.js index dae047f46..7fa00bdbc 100644 --- a/src/stores/streaming.js +++ b/src/stores/streaming.js @@ -235,7 +235,7 @@ export const useStreamingStore = defineStore('streaming', { ) setTimeout(() => { - if (this.retrying) return // retry aborted (i.e. due to logout) + if (!this.retrying) return // retry aborted (i.e. due to logout) this.initSocket() }, retryTimeout(this.retryMultiplier)) From c8593a9668fed6b444ab380e8d0b0c7541660e30 Mon Sep 17 00:00:00 2001 From: Henry Jameson Date: Tue, 1 Sep 2026 18:36:57 +0300 Subject: [PATCH 3/4] P3 --- src/stores/streaming.js | 12 ++++++++++-- 1 file changed, 10 insertions(+), 2 deletions(-) diff --git a/src/stores/streaming.js b/src/stores/streaming.js index 7fa00bdbc..a1cf0b885 100644 --- a/src/stores/streaming.js +++ b/src/stores/streaming.js @@ -108,7 +108,14 @@ export const useStreamingStore = defineStore('streaming', { } }, initSocket(initial) { - if (this.socket) throw new Error('Socket already exists!') + if (this.socket) { + console.error("Socket already exists! This shouldn't happen! Force-closing the socket just in case") + try { + this.socket.close() + } catch (e) { + console.error("Error closing existing socket that shouldn't be there. Welp. Moving on.", e) + } + } this.state = initial ? WSConnectionStatus.STARTING_INITIAL @@ -130,7 +137,8 @@ export const useStreamingStore = defineStore('streaming', { this.socket.addEventListener('error', this.onError) }, stopSocket() { - this.socket.close() + if (this.socket == null) console.error("Socket is already stopped! This shouldn't happen!") + this.socket?.close() this.socket = null this.state = WSConnectionStatus.CLOSED this.retrying = false From 7b58a96ecee24e97fe6e5daf7bba6484449e403a Mon Sep 17 00:00:00 2001 From: Henry Jameson Date: Tue, 1 Sep 2026 18:46:50 +0300 Subject: [PATCH 4/4] lint --- src/stores/streaming.js | 14 ++++++++++---- 1 file changed, 10 insertions(+), 4 deletions(-) diff --git a/src/stores/streaming.js b/src/stores/streaming.js index a1cf0b885..554d6a6b5 100644 --- a/src/stores/streaming.js +++ b/src/stores/streaming.js @@ -109,11 +109,16 @@ export const useStreamingStore = defineStore('streaming', { }, initSocket(initial) { if (this.socket) { - console.error("Socket already exists! This shouldn't happen! Force-closing the socket just in case") + console.error( + "Socket already exists! This shouldn't happen! Force-closing the socket just in case", + ) try { - this.socket.close() + this.socket.close() } catch (e) { - console.error("Error closing existing socket that shouldn't be there. Welp. Moving on.", e) + console.error( + "Error closing existing socket that shouldn't be there. Welp. Moving on.", + e, + ) } } @@ -137,7 +142,8 @@ export const useStreamingStore = defineStore('streaming', { this.socket.addEventListener('error', this.onError) }, stopSocket() { - if (this.socket == null) console.error("Socket is already stopped! This shouldn't happen!") + if (this.socket == null) + console.error("Socket is already stopped! This shouldn't happen!") this.socket?.close() this.socket = null this.state = WSConnectionStatus.CLOSED