ソースを参照

WIP: 重置群聊恢复退避

[gstack-context]
Decisions: 新页面挂载或停止群聊后重置恢复退避,避免上次失败延迟影响下次打开
Remaining: 最终完整测试、重启 8800、真实页面验收
Tried: 初始连接恢复用例通过
Skill: /investigate
[/gstack-context]
samien 2 ヶ月 前
親
コミット
5047af6d49
1 ファイル変更、3 行追加、0 行削除
  1. 3 0
      src/client/stores/groups.ts

+ 3 - 0
src/client/stores/groups.ts

@@ -194,6 +194,7 @@ export const useGroupsStore = defineStore('groups', () => {
 
   async function start(): Promise<void> {
     availability.value = 'checking'
+    recoveryAttempt = 0
     protocol.value = initialProtocol()
     const cached = await cache.get(scope(), 'snapshot')
     if (cached?.state.epoch) {
@@ -211,6 +212,8 @@ export const useGroupsStore = defineStore('groups', () => {
     reconnectTimer = undefined
     if (recoveryTimer !== undefined) window.clearTimeout(recoveryTimer)
     recoveryTimer = undefined
+    reconnectAttempt = 0
+    recoveryAttempt = 0
     connectionState.value = 'disconnected'
   }