Skip to content

Commit f38ca13

Browse files
authored
Merge pull request kubernetes#88267 from mfojtik/revert-con-refused-retry
client-go: remove connection refused to list of retriable errors
2 parents d58216a + 0dfe0c7 commit f38ca13

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

staging/src/k8s.io/client-go/rest/request.go

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -827,15 +827,15 @@ func (r *Request) request(ctx context.Context, fn func(*http.Request, *http.Resp
827827
r.backoff.UpdateBackoff(r.URL(), err, resp.StatusCode)
828828
}
829829
if err != nil {
830-
// "Connection reset by peer", "Connection refused" or "apiserver is shutting down" are usually a transient errors.
830+
// "Connection reset by peer" or "apiserver is shutting down" are usually a transient errors.
831831
// Thus in case of "GET" operations, we simply retry it.
832832
// We are not automatically retrying "write" operations, as
833833
// they are not idempotent.
834834
if r.verb != "GET" {
835835
return err
836836
}
837837
// For connection errors and apiserver shutdown errors retry.
838-
if net.IsConnectionReset(err) || net.IsConnectionRefused(err) {
838+
if net.IsConnectionReset(err) {
839839
// For the purpose of retry, we set the artificial "retry-after" response.
840840
// TODO: Should we clean the original response if it exists?
841841
resp = &http.Response{

0 commit comments

Comments
 (0)