mirror of https://github.com/Dreamacro/clash.git
Fix: ignore meanDelay error
This commit is contained in:
parent
3b1d319820
commit
148ebccb60
|
@ -161,7 +161,8 @@ func (p *Proxy) URLTest(ctx context.Context, url string) (delay, meanDelay uint1
|
||||||
|
|
||||||
resp, err = client.Do(req)
|
resp, err = client.Do(req)
|
||||||
if err != nil {
|
if err != nil {
|
||||||
return
|
// ignore error because some server will hijack the connection and close immediately
|
||||||
|
return delay, 0, nil
|
||||||
}
|
}
|
||||||
resp.Body.Close()
|
resp.Body.Close()
|
||||||
meanDelay = uint16(time.Since(start) / time.Millisecond / 2)
|
meanDelay = uint16(time.Since(start) / time.Millisecond / 2)
|
||||||
|
|
Loading…
Reference in New Issue