Skip to content

Commit

Permalink
Merge pull request #30 from XanSmarty/retry-sender-comment
Browse files Browse the repository at this point in the history
Add comment about 429 retries
  • Loading branch information
kgividen authored Sep 1, 2023
2 parents ffd8a6c + 12da5b1 commit 13013d5
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions internal/sdk/retry_client.go
Original file line number Diff line number Diff line change
Expand Up @@ -81,6 +81,7 @@ func (r *RetryClient) handleHttpStatusCode(response *http.Response, attempt *int
}
if response.StatusCode == http.StatusTooManyRequests {
r.sleeper(time.Second * time.Duration(r.random(backOffRateLimit)))
// Setting attempt to 1 will make 429s retry indefinitely; this is intended behavior.
*attempt = 1
}
return true
Expand Down

0 comments on commit 13013d5

Please sign in to comment.