File tree Expand file tree Collapse file tree 1 file changed +6
-6
lines changed
Expand file tree Collapse file tree 1 file changed +6
-6
lines changed Original file line number Diff line number Diff line change @@ -359,11 +359,11 @@ func (c *Client) setRetryAfter(d time.Duration) {
359359// If no headers are set, default to 1 minute.
360360func parseRateLimitDelay (resp * http.Response ) time.Duration {
361361 // GitHub docs show Retry-After header will always be an int
362- var replyAfterDelay * time.Duration
362+ var retryAfterDelay * time.Duration
363363 if ra := resp .Header .Get ("Retry-After" ); ra != "" {
364364 if seconds , err := strconv .Atoi (ra ); err == nil {
365365 rad := time .Duration (seconds ) * time .Second
366- replyAfterDelay = & rad
366+ retryAfterDelay = & rad
367367 }
368368 }
369369
@@ -379,10 +379,10 @@ func parseRateLimitDelay(resp *http.Response) time.Duration {
379379 }
380380
381381 switch {
382- case replyAfterDelay != nil && rateLimitResetDelay != nil :
383- return max (* replyAfterDelay , * rateLimitResetDelay )
384- case replyAfterDelay != nil :
385- return * replyAfterDelay
382+ case retryAfterDelay != nil && rateLimitResetDelay != nil :
383+ return max (* retryAfterDelay , * rateLimitResetDelay )
384+ case retryAfterDelay != nil :
385+ return * retryAfterDelay
386386 case rateLimitResetDelay != nil :
387387 return * rateLimitResetDelay
388388 default :
You can’t perform that action at this time.
0 commit comments