diff --git a/internal/internal.go b/internal/internal.go index 735d6af..4a59c59 100644 --- a/internal/internal.go +++ b/internal/internal.go @@ -15,6 +15,10 @@ func RetryBackoff(retry int, minBackoff, maxBackoff time.Duration) time.Duration } d := minBackoff << uint(retry) + if d < minBackoff { + return maxBackoff + } + d = minBackoff + time.Duration(rand.Int63n(int64(d))) if d > maxBackoff || d < minBackoff {