Fix: should reset fast node when tolerance enable and not alive on url-test group

This commit is contained in:
Dreamacro 2021-04-04 17:40:25 +08:00
parent a1f3a5ea26
commit 0a35237915

View file

@ -79,7 +79,7 @@ func (u *URLTest) fast(touch bool) C.Proxy {
}
// tolerance
if u.fastNode == nil || u.fastNode.LastDelay() > fast.LastDelay()+u.tolerance {
if u.fastNode == nil || !u.fastNode.Alive() || u.fastNode.LastDelay() > fast.LastDelay()+u.tolerance {
u.fastNode = fast
}