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’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Avoid infinite loop and patch exponential backoff edge case #68

Merged
merged 3 commits into from
Dec 16, 2020

Conversation

gittyeric
Copy link
Contributor

This changes a few snags I hit as a noob to the API that I figured I'd toss up as a PR:

  • Make exponential backoff not degrade to a sum when minTimeout is <= 0
  • Auto-switch to forever mode when retries is Infinity. This is still problematic for the timeouts method but at least it patches the primary use-case.

I hope I got the version change right, let me know if you need anything else, thanks!

@codecov
Copy link

codecov bot commented Apr 26, 2019

Codecov Report

Merging #68 into master will not change coverage.
The diff coverage is 100%.

Impacted file tree graph

@@          Coverage Diff           @@
##           master     #68   +/-   ##
======================================
  Coverage    90.2%   90.2%           
======================================
  Files           2       2           
  Lines         143     143           
======================================
  Hits          129     129           
  Misses         14      14
Impacted Files Coverage Δ
lib/retry.js 98% <100%> (ø) ⬆️

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update 88548b9...f7c14c1. Read the comment docs.

Copy link
Owner

@tim-kos tim-kos left a comment

Choose a reason for hiding this comment

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

Great, thank you!

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.

None yet

2 participants