Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We鈥檒l occasionally send you account related emails.

Already on GitHub? Sign in to your account

Several retry problems #390

Open
1 of 3 tasks
xmedeko opened this issue Oct 26, 2021 · 1 comment
Open
1 of 3 tasks

Several retry problems #390

xmedeko opened this issue Oct 26, 2021 · 1 comment
Labels
bug Something isn't working help wanted Extra attention is needed

Comments

@xmedeko
Copy link

xmedeko commented Oct 26, 2021

Retry algorithm has several problems:

  • Retry delay(ms) wait is not abortable by this._options.signal , see
    await delay(ms);
  • If Retry-After is 0, i.e. "retry immediately", then the request is not retried at all. (The problem is that 0 returned from _calculateRetryDelay is treaded as "stop retry").
  • IMO if Retry-After is above maxRetryAfter, then it should be capped to maxRetryAfter and not that the retry is stopped. See
    if (typeof this._options.retry.maxRetryAfter !== 'undefined' && after > this._options.retry.maxRetryAfter) {
@sindresorhus sindresorhus added bug Something isn't working help wanted Extra attention is needed labels Oct 26, 2021
@sindresorhus
Copy link
Owner

Thanks for reporting 馃檹

@szmarczak szmarczak added this to the 1.0.0 milestone Dec 10, 2021
@sindresorhus sindresorhus removed this from the 1.0.0 milestone Sep 1, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working help wanted Extra attention is needed
Projects
None yet
Development

No branches or pull requests

3 participants