summaryrefslogtreecommitdiffstats
path: root/pkg/backoff
diff options
context:
space:
mode:
authorDaniel Baumann <daniel.baumann@progress-linux.org>2024-04-13 11:41:39 +0000
committerDaniel Baumann <daniel.baumann@progress-linux.org>2024-04-13 11:41:39 +0000
commitfcfb5e62f95d625836328131cc5ca851182bcae4 (patch)
tree5309ef2284a82d61ece838d1dd1c97c09df152b8 /pkg/backoff
parentAdding upstream version 1.1.1. (diff)
downloadicingadb-fcfb5e62f95d625836328131cc5ca851182bcae4.tar.xz
icingadb-fcfb5e62f95d625836328131cc5ca851182bcae4.zip
Adding upstream version 1.2.0.upstream/1.2.0upstream
Signed-off-by: Daniel Baumann <daniel.baumann@progress-linux.org>
Diffstat (limited to 'pkg/backoff')
-rw-r--r--pkg/backoff/backoff.go4
1 files changed, 2 insertions, 2 deletions
diff --git a/pkg/backoff/backoff.go b/pkg/backoff/backoff.go
index 6ce7bee..e79a1ee 100644
--- a/pkg/backoff/backoff.go
+++ b/pkg/backoff/backoff.go
@@ -14,10 +14,10 @@ type Backoff func(uint64) time.Duration
// It panics if min >= max.
func NewExponentialWithJitter(min, max time.Duration) Backoff {
if min <= 0 {
- min = time.Millisecond * 100
+ min = 100 * time.Millisecond
}
if max <= 0 {
- max = time.Second * 10
+ max = 10 * time.Second
}
if min >= max {
panic("max must be larger than min")