mirror of
https://hubproxy.babadafafafafa.cn/https://github.com/mihomo-party-org/clash-party.git
synced 2026-09-20 08:03:39 +08:00
fix: stop dropping tolerance when converting a group to Smart (#2112)
The Smart override converts url-test and load-balance groups and then strips their type-specific keys. tolerance is in that list, but the Smart core supports it: SmartOption.Tolerance feeds the sort comparator, where delays within tolerance compare equal so the group stops flapping between nodes of near-identical latency. Because a normal override always runs before the Smart one, this leaves no way to set tolerance at all while the auto override is on - a value in the subscription is deleted, and so is one set by an earlier override. The branch that handles an already-smart group never deleted it, so the two paths disagreed. Co-authored-by: Claude Opus 5 <noreply@anthropic.com>
This commit is contained in:
@@ -86,10 +86,9 @@ function main(config) {
|
||||
group.uselightgbm = ${useLightGBM}
|
||||
group.collectdata = ${collectData}
|
||||
|
||||
// 移除 url-test 和 load-balance 特有的配置
|
||||
// 移除 url-test 和 load-balance 特有的配置(tolerance 是 Smart 也支持的选项,保留)
|
||||
if (group.url) delete group.url
|
||||
if (group.interval) delete group.interval
|
||||
if (group.tolerance) delete group.tolerance
|
||||
if (group.lazy) delete group.lazy
|
||||
if (group.expected_status) delete group['expected-status']
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user