优化 当延迟上下限条件为默认值时不进行过滤

This commit is contained in:
xiu2 2023-05-31 16:46:08 +08:00
parent b6f3ddcd4c
commit eae7d2eead
1 changed files with 4 additions and 1 deletions

View File

@ -92,7 +92,10 @@ func convertToString(data []CloudflareIPData) [][]string {
type PingDelaySet []CloudflareIPData
func (s PingDelaySet) FilterDelay() (data PingDelaySet) {
if InputMaxDelay > maxDelay || InputMinDelay < minDelay {
if InputMaxDelay > maxDelay || InputMinDelay < minDelay { // 当输入的延迟条件不在默认范围内时,不进行过滤
return s
}
if InputMaxDelay == maxDelay && InputMinDelay == minDelay { // 当输入的延迟条件为默认值时,不进行过滤
return s
}
for _, v := range s {