fix: 修复 XrayCore.Close() 中遗漏关闭 serverConfigMonitorPeriodic 导致的任务泄漏#10
Merged
wyx2685 merged 1 commit intoperfect-panel:masterfrom Dec 26, 2025
Merged
Conversation
问题描述: - 在 core/xray.go 的 Close() 方法中,遗漏了对 serverConfigMonitorPeriodic 任务的关闭调用 - 导致每次配置重载时,旧的配置监控任务继续运行 - 多次重载后,多个监控任务同时运行,导致 API 请求频率成倍增加 现象: - 每次重载后,获取服务端配置的请求频率增加 - 日志显示频繁的'检测到服务端配置变更,正在重启节点...'消息 修复: - 在 Close() 方法开始处添加关闭 serverConfigMonitorPeriodic 的逻辑 - 确保所有定时任务在 XrayCore 关闭时都能被正确清理 影响范围: - 修改 1 个文件: core/xray.go - 新增 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.
问题描述:
现象:
修复:
影响范围: