mirror of
https://github.com/rclone/rclone.git
synced 2025-12-24 04:04:37 +00:00
Update vendor dependencies
This commit is contained in:
8
vendor/google.golang.org/api/gensupport/retry.go
generated
vendored
8
vendor/google.golang.org/api/gensupport/retry.go
generated
vendored
@@ -55,23 +55,17 @@ func DefaultBackoffStrategy() BackoffStrategy {
|
||||
// shouldRetry returns true if the HTTP response / error indicates that the
|
||||
// request should be attempted again.
|
||||
func shouldRetry(status int, err error) bool {
|
||||
// Retry for 5xx response codes.
|
||||
if 500 <= status && status < 600 {
|
||||
if 500 <= status && status <= 599 {
|
||||
return true
|
||||
}
|
||||
|
||||
// Retry on statusTooManyRequests{
|
||||
if status == statusTooManyRequests {
|
||||
return true
|
||||
}
|
||||
|
||||
// Retry on unexpected EOFs and temporary network errors.
|
||||
if err == io.ErrUnexpectedEOF {
|
||||
return true
|
||||
}
|
||||
if err, ok := err.(net.Error); ok {
|
||||
return err.Temporary()
|
||||
}
|
||||
|
||||
return false
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user