Build Agentic workflows, RAG pipelines, with rich AI model and tool support on one collaborative workspace. Deploy on cloud, VPC, or self-hosted, so teams move from prototype to production without rebuilding the stack.
Python agentagentic-aiagentic-frameworkagentic-workflowaiautomationclaudedeepseekgenaigptllmlow-codemcpnextjsno-codeopenaipythonskillsworkflow
fix: fix refresh token deadlock (#30828)
wangxiaolei0c2729d9b30c
diff --git a/web/service/refresh-token.ts b/web/service/refresh-token.tsindex 3f63f628a19..998b7f2461c 100644--- a/web/service/refresh-token.ts+++ b/web/service/refresh-token.ts@@ -72,12 +72,12 @@ async function getNewAccessToken(timeout: number): Promise<void> {}function releaseRefreshLock() {- if (isRefreshing) {- isRefreshing = false- globalThis.localStorage.removeItem(LOCAL_STORAGE_KEY)- globalThis.localStorage.removeItem('last_refresh_time')- globalThis.removeEventListener('beforeunload', releaseRefreshLock)- }+ // Always clear the refresh lock to avoid cross-tab deadlocks.+ // This is safe to call multiple times and from tabs that were only waiting.+ isRefreshing = false+ globalThis.localStorage.removeItem(LOCAL_STORAGE_KEY)+ globalThis.localStorage.removeItem('last_refresh_time')+ globalThis.removeEventListener('beforeunload', releaseRefreshLock)}export async function refreshAccessTokenOrRelogin(timeout: number) {