Skip to content

Commit

Permalink
fix seed for retry policy
Browse files Browse the repository at this point in the history
Signed-off-by: Lixia (Sylvia) Lei <lixlei@microsoft.com>
  • Loading branch information
Wwwsylvia committed Sep 2, 2024
1 parent 70d98dd commit bf83617
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion registry/remote/retry/policy.go
Original file line number Diff line number Diff line change
Expand Up @@ -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 {
Expand Down

0 comments on commit bf83617

Please sign in to comment.