mirror of
https://github.com/containers/podman.git
synced 2025-11-04 00:50:15 +08:00
Vendor in common 0.33.1
As per title Signed-off-by: Ashley Cui <acui@redhat.com>
This commit is contained in:
6
vendor/github.com/containers/common/pkg/retry/retry.go
generated
vendored
6
vendor/github.com/containers/common/pkg/retry/retry.go
generated
vendored
@ -69,7 +69,7 @@ func isRetryable(err error) bool {
|
||||
}
|
||||
return isRetryable(e.Err)
|
||||
case syscall.Errno:
|
||||
return shouldRestart(e)
|
||||
return isErrnoRetryable(e)
|
||||
case errcode.Errors:
|
||||
// if this error is a group of errors, process them all in turn
|
||||
for i := range e {
|
||||
@ -94,10 +94,10 @@ func isRetryable(err error) bool {
|
||||
return false
|
||||
}
|
||||
|
||||
func shouldRestart(e error) bool {
|
||||
func isErrnoRetryable(e error) bool {
|
||||
switch e {
|
||||
case syscall.ECONNREFUSED, syscall.EINTR, syscall.EAGAIN, syscall.EBUSY, syscall.ENETDOWN, syscall.ENETUNREACH, syscall.ENETRESET, syscall.ECONNABORTED, syscall.ECONNRESET, syscall.ETIMEDOUT, syscall.EHOSTDOWN, syscall.EHOSTUNREACH:
|
||||
return true
|
||||
}
|
||||
return shouldRestartPlatform(e)
|
||||
return isErrnoERESTART(e)
|
||||
}
|
||||
|
||||
2
vendor/github.com/containers/common/pkg/retry/retry_linux.go
generated
vendored
2
vendor/github.com/containers/common/pkg/retry/retry_linux.go
generated
vendored
@ -4,6 +4,6 @@ import (
|
||||
"syscall"
|
||||
)
|
||||
|
||||
func shouldRestartPlatform(e error) bool {
|
||||
func isErrnoERESTART(e error) bool {
|
||||
return e == syscall.ERESTART
|
||||
}
|
||||
|
||||
2
vendor/github.com/containers/common/pkg/retry/retry_unsupported.go
generated
vendored
2
vendor/github.com/containers/common/pkg/retry/retry_unsupported.go
generated
vendored
@ -2,6 +2,6 @@
|
||||
|
||||
package retry
|
||||
|
||||
func shouldRestartPlatform(e error) bool {
|
||||
func isErrnoERESTART(e error) bool {
|
||||
return false
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user