Skip to content

Commit 664ab02

Browse files
chore(internal): codegen related update
1 parent ec13158 commit 664ab02

File tree

1 file changed

+3
-5
lines changed

1 file changed

+3
-5
lines changed

internal/requestconfig/requestconfig.go

Lines changed: 3 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -355,11 +355,9 @@ func (b *bodyWithTimeout) Close() error {
355355
}
356356

357357
func retryDelay(res *http.Response, retryCount int) time.Duration {
358-
// If the API asks us to wait a certain amount of time (and it's a reasonable amount),
359-
// just do what it says.
360-
361-
if retryAfterDelay, ok := parseRetryAfterHeader(res); ok && 0 <= retryAfterDelay && retryAfterDelay < time.Minute {
362-
return retryAfterDelay
358+
// If the backend tells us to wait a certain amount of time, use that value
359+
if retryAfterDelay, ok := parseRetryAfterHeader(res); ok {
360+
return max(0, retryAfterDelay)
363361
}
364362

365363
maxDelay := 8 * time.Second

0 commit comments

Comments
 (0)