浏览代码

Merge pull request #43202 from thaJeztah/skip_temporary_error_check

client/request.go:157:8: SA1019: err.Temporary is deprecated (staticcheck)
Tianon Gravi 3 年之前
父节点
当前提交
9bf647c375
共有 1 个文件被更改,包括 2 次插入4 次删除
  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)
 			}
 		}