From ef4dee6f0fb2c78566a614c922af8563a4e3990a Mon Sep 17 00:00:00 2001 From: Matt Reiferson Date: Sun, 12 Sep 2021 15:39:57 -0700 Subject: [PATCH] config: use explicit int64 for random durations --- config.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/config.go b/config.go index d799c5ff..644aaac8 100644 --- a/config.go +++ b/config.go @@ -72,7 +72,7 @@ func (s *FullJitterStrategy) Calculate(attempt int) time.Duration { backoffDuration := s.cfg.BackoffMultiplier * time.Duration(math.Pow(2, float64(attempt))) - return time.Duration(s.rng.Intn(int(backoffDuration))) + return time.Duration(s.rng.Int63n(int64(backoffDuration))) } func (s *FullJitterStrategy) setConfig(cfg *Config) {