refactor(linkage): 重构ClassIsland IPC连接逻辑,统一服务管理 - #284
Closed
CreeperAWA wants to merge 3 commits into
Closed
CreeperAWA wants to merge 3 commits into
CreeperAWA wants to merge 3 commits into
Conversation
1. 新增ClassIslandIpcConnection统一管理IPC连接,替换原分散在两个服务中的连接代码 2. 重构课程联动服务的快照比较逻辑,忽略倒计时等动态字段避免误触发状态变更 3. 调整课程联动刷新策略,仅在完全离线时轮询并延长轮询间隔 4. 统一通知服务的IPC连接逻辑,复用新的连接管理类
CreeperAWA
marked this pull request as draft
September 20, 2026 12:12
1. 为IPC连接断开添加500ms延迟重连,避免和ClassIsland的广播循环竞争 2. 新增对IPC连接断开异常的捕获处理,分别在存活检测和通知发送场景中静默处理断开情况并触发内置回退
重置下次连接尝试时间为最小值,当前重试延迟为最小延迟,允许立即重连,避免与 ClassIsland 的广播循环产生竞争。
CreeperAWA
marked this pull request as ready for review
September 24, 2026 14:34
lzy98276
added a commit
that referenced
this pull request
Sep 25, 2026
在 #284 的基础上补齐合入前必须修掉的问题: - 刷新时始终写入新快照,只用语义比较决定是否通知订阅者。完全丢弃倒计时会让 课前解禁、课后禁用延迟、课前重置和刷新调度读到陈旧值(#274 的自激循环来自 事件通知,不来自快照写入) - 恢复 SecRandom4Ci 插件版本门槛(1.2.0.0),旧插件不再被当作可用 - 退避期内立即返回,不再每次空等 10 秒;通知路径只等 1 秒,避免内置回退通知 与抽取前就该打开的 QuickDraw 结果窗口被拖后 - 恢复 IsAlive/ShowNotification 的 1 秒 IPC 调用超时,失败改走 _logger - 清理死常量与不准确的注释,Dispose 不再释放仍在使用的信号量 - 补测试:倒计时变化不通知但快照必须更新、课前解禁窗口按时打开、退避期快速返回、 插件版本门槛;PluginDrawServiceTests 注册新的连接类型 fix #274
Member
|
感谢 @CreeperAWA 的重构 🙏 方向是对的,而且定位准确:#274 的自激来源就是「倒计时字段让快照每次都被判定为变化 → 由于这个 PR 的 base 是 你的三个 commit 原样保留,作者仍是你( 修正的内容:
因为对该 fork 只有 |
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.
fix #274