Skip to content

Commit

Permalink
Lower factor, reduces total wait
Browse files Browse the repository at this point in the history
  • Loading branch information
Minibrams committed Aug 8, 2024
1 parent 9d38e1d commit 5c1cd48
Showing 1 changed file with 2 additions and 5 deletions.
7 changes: 2 additions & 5 deletions http.go
Original file line number Diff line number Diff line change
Expand Up @@ -55,11 +55,8 @@ func (r *RetryRoundTripper) RoundTrip(req *http.Request) (*http.Response, error)
return resp, nil
}

baseWait := 9 * time.Second
backoff := time.Duration(math.Pow(2, float64(i))) * time.Second
wait := baseWait + backoff

time.Sleep(wait)
backoff := time.Duration(math.Pow(1.5, float64(i))) * time.Second
time.Sleep(backoff)
}

return resp, err
Expand Down

0 comments on commit 5c1cd48

Please sign in to comment.