fix: 连接断开时作废当前同步 context - #241
Open
CorrectRoadH wants to merge 1 commit into
Open
Conversation
onClose 只把 isSyncing 置 false,同步 context 还留着。在途的全库扫描既失去了 重入保护,又不知道自己该停,会一路扫完并用已断开的连接发一轮数据。 断开时一并清空 activeSyncContext,让扫描循环在下一个让出点自行退出。 Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01T2QYrNjmd1hNqgzWyR4jFZ
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.
问题
websocket_manager.ts的onClose里只把isSyncing置回false,但activeSyncContext还留着。这样一来:修复
断开时一并清空
activeSyncContext,配合扫描循环里的 context 归属检查,在途扫描会在下一个让出点自行退出。已跑
tsc -noEmit -skipLibCheck通过。🤖 Generated with Claude Code
https://claude.ai/code/session_01T2QYrNjmd1hNqgzWyR4jFZ