Skip to content

Commit

Permalink
unused param removal / bug
Browse files Browse the repository at this point in the history
  • Loading branch information
kevinkruger committed Dec 16, 2024
1 parent 0672bbe commit 17c632f
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions internal/ld/ld.go
Original file line number Diff line number Diff line change
Expand Up @@ -77,8 +77,8 @@ func IsTransient(err error) bool {
// Fallback to default backoff if header can't be parsed
// https://apidocs.launchdarkly.com/#section/Overview/Rate-limiting
// Method is curried in order to avoid stubbing the time package and fallback Backoff in unit tests
func RateLimitBackoff(now func() time.Time, fallbackBackoff h.Backoff) func(minDuration, max time.Duration, attemptNum int, resp *http.Response) time.Duration {
return func(minDuration, max time.Duration, attemptNum int, resp *http.Response) time.Duration {
func RateLimitBackoff(now func() time.Time, fallbackBackoff h.Backoff) func(minDuration, _ time.Duration, attemptNum int, resp *http.Response) time.Duration {
return func(minDuration, max2 time.Duration, attemptNum int, resp *http.Response) time.Duration {
if resp != nil {
if resp.StatusCode == http.StatusTooManyRequests {
if s, ok := resp.Header["X-Ratelimit-Reset"]; ok {
Expand All @@ -96,7 +96,7 @@ func RateLimitBackoff(now func() time.Time, fallbackBackoff h.Backoff) func(minD
}
}

return fallbackBackoff(minDuration, max, attemptNum, resp)
return fallbackBackoff(minDuration, max2, attemptNum, resp)
}
}

Expand Down

0 comments on commit 17c632f

Please sign in to comment.