From bf836175f63621807fbe972e8e6b1c7878b19b6b Mon Sep 17 00:00:00 2001 From: "Lixia (Sylvia) Lei" Date: Mon, 2 Sep 2024 15:15:50 +0800 Subject: [PATCH] fix seed for retry policy Signed-off-by: Lixia (Sylvia) Lei --- registry/remote/retry/policy.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/registry/remote/retry/policy.go b/registry/remote/retry/policy.go index 38e015cc..ebe8b373 100644 --- a/registry/remote/retry/policy.go +++ b/registry/remote/retry/policy.go @@ -96,7 +96,7 @@ func ExponentialBackoff(backoff time.Duration, factor, jitter float64) Backoff { return func(attempt int, resp *http.Response) time.Duration { var h maphash.Hash h.SetSeed(maphash.MakeSeed()) - rand := rand.New(rand.NewPCG(h.Sum64(), 0)) + rand := rand.New(rand.NewPCG(0, h.Sum64())) // check Retry-After if resp != nil && resp.StatusCode == http.StatusTooManyRequests {