From 81ae30ba6e93a2fc96619fd1093f6bc6ef6411e9 Mon Sep 17 00:00:00 2001 From: Ismail Gjevori Date: Mon, 25 Nov 2024 20:38:28 +0100 Subject: [PATCH] strea.go: update comment --- stream.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/stream.go b/stream.go index 1f95fc97ccd6..17e2267b3320 100644 --- a/stream.go +++ b/stream.go @@ -709,7 +709,7 @@ func (a *csAttempt) shouldRetry(err error) (bool, error) { } else { fact := math.Pow(rp.BackoffMultiplier, float64(cs.numRetriesSincePushback)) cur := min(float64(rp.InitialBackoff)*fact, float64(rp.MaxBackoff)) - // apply a jitter of plus or minus 0.2 + // Apply jitter by multiplying with a random factor between 0.8 and 1.2 cur *= 0.8 + 0.4*rand.Float64() dur = time.Duration(int64(cur)) cs.numRetriesSincePushback++