forked from TrueCloudLab/rclone
zoho: sleep for 60 seconds if rate limit error received
This commit is contained in:
parent
edf6537c61
commit
3fef8016b5
1 changed files with 4 additions and 0 deletions
|
@ -289,6 +289,10 @@ func shouldRetry(ctx context.Context, resp *http.Response, err error) (bool, err
|
||||||
authRetry = true
|
authRetry = true
|
||||||
fs.Debugf(nil, "Should retry: %v", err)
|
fs.Debugf(nil, "Should retry: %v", err)
|
||||||
}
|
}
|
||||||
|
if resp != nil && resp.StatusCode == 429 {
|
||||||
|
fs.Errorf(nil, "zoho: rate limit error received, sleeping for 60s: %v", err)
|
||||||
|
time.Sleep(60 * time.Second)
|
||||||
|
}
|
||||||
return authRetry || fserrors.ShouldRetry(err) || fserrors.ShouldRetryHTTP(resp, retryErrorCodes), err
|
return authRetry || fserrors.ShouldRetry(err) || fserrors.ShouldRetryHTTP(resp, retryErrorCodes), err
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue