Skip to content

Comments

Fix timeout to apply to total operation including retries#825

Merged
sindresorhus merged 1 commit intomainfrom
fix-timeout
Feb 21, 2026
Merged

Fix timeout to apply to total operation including retries#825
sindresorhus merged 1 commit intomainfrom
fix-timeout

Conversation

@sindresorhus
Copy link
Owner

The timeout option now correctly applies to the entire operation including all retry attempts, as documented. Previously, each retry attempt received its own independent timeout.

Fixes #784


// Don't apply jitter when server provides explicit retry timing
return after < max ? after : max;
return this.#clampRetryDelayToMax(after);
Copy link
Owner Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@sindresorhus sindresorhus force-pushed the fix-timeout branch 5 times, most recently from 79264b4 to 429da77 Compare February 21, 2026 19:07
The `timeout` option now correctly applies to the entire operation including all retry attempts, as documented. Previously, each retry attempt received its own independent timeout.

Fixes #784
@sindresorhus sindresorhus merged commit aac83fa into main Feb 21, 2026
6 checks passed
@sindresorhus sindresorhus deleted the fix-timeout branch February 21, 2026 19:26
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Timeout doesn't behave like documented

2 participants