mirror of
https://github.com/clash-verge-rev/clash-verge-rev.git
synced 2026-01-29 17:15:38 +08:00
fix: provider proxy sort by delay
This commit is contained in:
@@ -55,6 +55,17 @@ class DelayManager {
|
||||
return -1;
|
||||
}
|
||||
|
||||
/// 暂时修复provider的节点延迟排序的问题
|
||||
getDelayFix(proxy: ApiType.ProxyItem, group: string) {
|
||||
if (!proxy.provider) return this.getDelay(proxy.name, group);
|
||||
|
||||
if (proxy.history.length > 0) {
|
||||
// 0ms以error显示
|
||||
return proxy.history[proxy.history.length - 1].delay || 1e6;
|
||||
}
|
||||
return -1;
|
||||
}
|
||||
|
||||
async checkDelay(name: string, group: string) {
|
||||
let delay = -1;
|
||||
|
||||
|
||||
Reference in New Issue
Block a user