mirror of
https://github.com/rclone/rclone.git
synced 2024-11-22 15:30:06 +08:00
zoho: sleep for 60 seconds if rate limit error received
This commit is contained in:
parent
edf6537c61
commit
3fef8016b5
|
@ -289,6 +289,10 @@ func shouldRetry(ctx context.Context, resp *http.Response, err error) (bool, err
|
|||
authRetry = true
|
||||
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
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in New Issue
Block a user