Merged
Conversation
Contributor
Shomi-FJS
commented
Mar 29, 2026
- 新增 autoReconnectAtom 状态存储重连设置
- 断开后 200ms 立即重连一次,之后每 3 秒重试
- 连接成功后清除重连定时器
- 手动断开不会触发自动重连
- 切换开关立即生效
- 连接成功后清除错误提示
- 设置界面新增断开自动重连开关
- 同时在UI页面增加了用户设置开关
apoint123
reviewed
Mar 29, 2026
There was a problem hiding this comment.
Pull request overview
该 PR 在现有 WebSocket 连接管理基础上,引入“断开后自动重连”的用户设置与实现逻辑,提升连接稳定性与可用性。
Changes:
- 新增
autoReconnectAtom持久化存储自动重连开关状态 - 在
AmllWsClient中实现断开后 200ms 立即重连、之后每 3 秒重试,并在连接成功后清理重连定时器与错误提示 - 在设置界面新增“断开自动重连”开关供用户控制
Reviewed changes
Copilot reviewed 3 out of 3 changed files in this pull request and generated 1 comment.
| File | Description |
|---|---|
| src/store/index.ts | 新增 autoReconnectAtom 作为自动重连开关的持久化状态 |
| src/components/headless/AmllWsClient.tsx | 增加重连定时器/逻辑,并在连接成功后清理与清空错误提示 |
| src/App.tsx | 设置页新增“断开自动重连”开关入口 |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
apoint123
reviewed
Mar 29, 2026
apoint123
reviewed
Mar 29, 2026
- 新增 autoReconnectAtom 状态存储重连设置 - 断开后每 3 秒自动重连 - 连接成功后清除重连定时器 - 手动断开不会触发自动重连 - 切换开关立即生效 - 连接成功后清除错误提示 - 设置界面新增断开自动重连开关
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.