Commit b850077d authored by renovate's avatar renovate
Browse files

Update module cenkalti/backoff/v4 to v4.1.1

parent cac8fcaa
Pipeline #16706 passed with stages
in 1 minute and 50 seconds
......@@ -6,7 +6,7 @@ require (
git.autistici.org/ai3/go-common v0.0.0-20210507084757-2cf72583ce0e
git.autistici.org/id/usermetadb v0.0.0-20210507085300-ad16aa223703
github.com/bradfitz/gomemcache v0.0.0-20190913173617-a41fca850d0b
github.com/cenkalti/backoff/v4 v4.1.0
github.com/cenkalti/backoff/v4 v4.1.1
github.com/coreos/go-systemd/v22 v22.3.2
github.com/go-ldap/ldap/v3 v3.3.0
github.com/go-sql-driver/mysql v1.6.0
......
......@@ -57,10 +57,6 @@ func (b *backOffContext) NextBackOff() time.Duration {
case <-b.ctx.Done():
return Stop
default:
return b.BackOff.NextBackOff()
}
next := b.BackOff.NextBackOff()
if deadline, ok := b.ctx.Deadline(); ok && deadline.Sub(time.Now()) < next { // nolint: gosimple
return Stop
}
return next
}
......@@ -62,6 +62,10 @@ func RetryNotifyWithTimer(operation Operation, b BackOff, notify Notify, t Timer
}
if next = b.NextBackOff(); next == Stop {
if cerr := ctx.Err(); cerr != nil {
return cerr
}
return err
}
......
......@@ -26,7 +26,7 @@ github.com/boombuler/barcode/utils
# github.com/bradfitz/gomemcache v0.0.0-20190913173617-a41fca850d0b
## explicit
github.com/bradfitz/gomemcache/memcache
# github.com/cenkalti/backoff/v4 v4.1.0
# github.com/cenkalti/backoff/v4 v4.1.1
## explicit
github.com/cenkalti/backoff/v4
# github.com/cespare/xxhash/v2 v2.1.1
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment