From e1292073fca933c87ef4ff2167c7a9853cb9d451 Mon Sep 17 00:00:00 2001 From: Haze <709547807@qq.com> Date: Sat, 18 Apr 2026 15:04:10 +0800 Subject: [PATCH] fix(gateway): prevent session loading if gateway is not ready --- src/stores/gateway.ts | 3 +++ 1 file changed, 3 insertions(+) diff --git a/src/stores/gateway.ts b/src/stores/gateway.ts index dcb2b9b..910f336 100644 --- a/src/stores/gateway.ts +++ b/src/stores/gateway.ts @@ -97,6 +97,9 @@ function maybeLoadSessions( state: { loadSessions: () => Promise }, force = false, ): void { + const { status } = useGatewayStore.getState(); + if (status.gatewayReady === false) return; + const now = Date.now(); if (!force && now - lastLoadSessionsAt < LOAD_SESSIONS_MIN_INTERVAL_MS) return; lastLoadSessionsAt = now;