mirror of
https://github.com/kubernetes/kubernetes.git
synced 2026-02-03 20:40:26 -05:00
Invert error validation
This commit is contained in:
parent
423c17d859
commit
e7ced21235
1 changed files with 1 additions and 1 deletions
|
|
@ -134,7 +134,7 @@ func newWalkFunc(invalidLink *bool, client *http.Client) filepath.WalkFunc {
|
|||
// And Go client will follow redirects automatically so the 301 check is probably unnecessary.
|
||||
if resp.StatusCode == http.StatusTooManyRequests || resp.StatusCode == http.StatusServiceUnavailable {
|
||||
retryAfter := resp.Header.Get("Retry-After")
|
||||
if seconds, err := strconv.Atoi(retryAfter); err != nil {
|
||||
if seconds, err := strconv.Atoi(retryAfter); err == nil {
|
||||
backoff = seconds + 10
|
||||
}
|
||||
fmt.Fprintf(os.Stderr, "Got %d visiting %s, retry after %d seconds.\n", resp.StatusCode, string(URL), backoff)
|
||||
|
|
|
|||
Loading…
Reference in a new issue