Fix: limit concurrency number of provider health check

This commit is contained in:
Dreamacro
2021-07-21 17:01:02 +08:00
parent 53e17a916b
commit 8d37220566
4 changed files with 203 additions and 11 deletions

View File

@ -136,6 +136,8 @@ func (p *Proxy) URLTest(ctx context.Context, url string) (t uint16, err error) {
return http.ErrUseLastResponse
},
}
defer client.CloseIdleConnections()
resp, err := client.Do(req)
if err != nil {
return