Explorar o código

Merge pull request #43202 from thaJeztah/skip_temporary_error_check

client/request.go:157:8: SA1019: err.Temporary is deprecated (staticcheck)
Tianon Gravi %!s(int64=3) %!d(string=hai) anos
pai
achega
9bf647c375
Modificáronse 1 ficheiros con 2 adicións e 4 borrados
  1. 2 4
      client/request.go

+ 2 - 4
client/request.go

@@ -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)
 			}
 		}