Update vendored library github.com/cenkalti/backoff
This commit is contained in:
parent
5a77b2ab49
commit
673f0bbd6c
9 changed files with 23 additions and 13 deletions
|
@ -34,7 +34,7 @@ func NewRetryBackend(be restic.Backend, maxTries int, report func(string, error,
|
|||
|
||||
func (be *RetryBackend) retry(ctx context.Context, msg string, f func() error) error {
|
||||
err := backoff.RetryNotify(f,
|
||||
backoff.WithContext(backoff.WithMaxTries(backoff.NewExponentialBackOff(), uint64(be.MaxTries)), ctx),
|
||||
backoff.WithContext(backoff.WithMaxRetries(backoff.NewExponentialBackOff(), uint64(be.MaxTries)), ctx),
|
||||
func(err error, d time.Duration) {
|
||||
if be.Report != nil {
|
||||
be.Report(msg, err, d)
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue