Merge pull request #43202 from thaJeztah/skip_temporary_error_check

client/request.go:157:8: SA1019: err.Temporary is deprecated (staticcheck)
This commit is contained in:
Tianon Gravi 2022-02-07 16:42:05 -08:00 committed by GitHub
commit 9bf647c375
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -154,10 +154,8 @@ func (cli *Client) doRequest(ctx context.Context, req *http.Request) (serverResp
if err.Timeout() {
return serverResp, ErrorConnectionFailed(cli.host)
}
if !err.Temporary() {
if strings.Contains(err.Error(), "connection refused") || strings.Contains(err.Error(), "dial unix") {
return serverResp, ErrorConnectionFailed(cli.host)
}
if strings.Contains(err.Error(), "connection refused") || strings.Contains(err.Error(), "dial unix") {
return serverResp, ErrorConnectionFailed(cli.host)
}
}