mirror of
https://github.com/XIU2/CloudflareSpeedTest.git
synced 2026-03-27 19:29:02 +08:00
fix filter delay time invalid bug
This commit is contained in:
@@ -89,10 +89,10 @@ func (s PingDelaySet) FilterDelay() (data PingDelaySet) {
|
|||||||
return s
|
return s
|
||||||
}
|
}
|
||||||
for _, v := range s {
|
for _, v := range s {
|
||||||
if v.Delay > maxDelay { // 平均延迟上限
|
if v.Delay > InputMaxDelay { // 平均延迟上限
|
||||||
break
|
break
|
||||||
}
|
}
|
||||||
if v.Delay <= minDelay { // 平均延迟下限
|
if v.Delay <= InputMinDelay { // 平均延迟下限
|
||||||
continue
|
continue
|
||||||
}
|
}
|
||||||
data = append(data, v) // 延迟满足条件时,添加到新数组中
|
data = append(data, v) // 延迟满足条件时,添加到新数组中
|
||||||
|
|||||||
Reference in New Issue
Block a user