diff --git a/CHANGELOG.md b/CHANGELOG.md index 232c74eb67..b3adf84fed 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -2,6 +2,7 @@ - Upstream: 2024.11.0-alpha.1 タッグをマージする - DevOps: 管理者アクセストークンがユーザー登録できるようになる (write:admin:create-account) +- Frontend: Stream再接続ロジックdata raceを修正 - Security: CSPにCDNなどの外部ホストはホワイトリストできるように ## 2024.11.0-yumechinokuni.3 diff --git a/packages/frontend/src/stream.ts b/packages/frontend/src/stream.ts index 57fae49d4b..c3b5a2fb4b 100644 --- a/packages/frontend/src/stream.ts +++ b/packages/frontend/src/stream.ts @@ -38,11 +38,9 @@ function createStream(): Misskey.IStream { console.log('Stream disconnected, attempting to reconnect...'); if (reconnectAttempts < RECONNECT_MAX_ATTEMPTS) { const delay = getReconnectDelay(); - reconnectTimeout = window.setTimeout(() => { - reconnectAttempts++; - stream = null; - useStream(); - }, delay); + reconnectAttempts++; + stream = null; + reconnectTimeout = window.setTimeout(useStream, delay); } else { console.error('Max reconnection attempts reached'); }