mirror of
https://github.com/containers/skopeo.git
synced 2025-08-31 22:28:33 +00:00
Update module github.com/containers/common to v0.64.0
Signed-off-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
This commit is contained in:
3
vendor/github.com/containers/common/pkg/retry/retry.go
generated
vendored
3
vendor/github.com/containers/common/pkg/retry/retry.go
generated
vendored
@@ -4,6 +4,7 @@ import (
|
||||
"context"
|
||||
"io"
|
||||
"math"
|
||||
"math/rand/v2"
|
||||
"net"
|
||||
"net/http"
|
||||
"net/url"
|
||||
@@ -47,6 +48,8 @@ func IfNecessary(ctx context.Context, operation func() error, options *Options)
|
||||
delay = options.Delay
|
||||
}
|
||||
logrus.Warnf("Failed, retrying in %s ... (%d/%d). Error: %v", delay, attempt+1, options.MaxRetry, err)
|
||||
delay += rand.N(delay / 10) // 10 % jitter so that a failure blip doesn’t cause a deterministic stampede
|
||||
logrus.Debugf("Retry delay with added jitter: %s", delay)
|
||||
select {
|
||||
case <-time.After(delay):
|
||||
// Do nothing.
|
||||
|
Reference in New Issue
Block a user