Skip to content

Commit 960ce81

Browse files
erezrokahgmlewis
andauthored
Update github/github.go
Co-authored-by: Glenn Lewis <[email protected]>
1 parent aa0d4b9 commit 960ce81

1 file changed

Lines changed: 1 addition & 2 deletions

File tree

‎github/github.go‎

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -892,8 +892,7 @@ func (c *Client) BareDo(ctx context.Context, req *http.Request) (*Response, erro
892892

893893
rateLimitError, ok := err.(*RateLimitError)
894894
if ok && req.Context().Value(SleepUntilPrimaryRateLimitResetWhenRateLimited) != nil {
895-
err := sleepUntilResetWithBuffer(req.Context(), rateLimitError.Rate.Reset.Time)
896-
if err != nil {
895+
if err := sleepUntilResetWithBuffer(req.Context(), rateLimitError.Rate.Reset.Time); err != nil {
897896
return response, err
898897
}
899898
// retry the request once when the rate limit has reset

0 commit comments

Comments
 (0)