diff --git a/internal/internal.go b/internal/internal.go index 6fd344b5..756fc254 100644 --- a/internal/internal.go +++ b/internal/internal.go @@ -10,6 +10,9 @@ func RetryBackoff(retry int, minBackoff, maxBackoff time.Duration) time.Duration if retry < 0 { panic("not reached") } + if minBackoff == 0 { + return 0 + } d := minBackoff << uint(retry) d = minBackoff + time.Duration(rand.Int63n(int64(d)))