Skip to content

Commit

Permalink
Update github/github.go
Browse files Browse the repository at this point in the history
Co-authored-by: Glenn Lewis <[email protected]>
  • Loading branch information
erezrokah and gmlewis authored Apr 18, 2024
1 parent 22eba4c commit aa0d4b9
Showing 1 changed file with 1 addition and 2 deletions.
3 changes: 1 addition & 2 deletions github/github.go
Original file line number Diff line number Diff line change
Expand Up @@ -963,8 +963,7 @@ func (c *Client) checkRateLimitBeforeDo(req *http.Request, rateLimitCategory Rat
}

if req.Context().Value(SleepUntilPrimaryRateLimitResetWhenRateLimited) != nil {
err := sleepUntilResetWithBuffer(req.Context(), rate.Reset.Time)
if err == nil {
if err := sleepUntilResetWithBuffer(req.Context(), rate.Reset.Time); err == nil {
return nil
}
return &RateLimitError{
Expand Down

0 comments on commit aa0d4b9

Please sign in to comment.