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

feat: allow retryDelay to be 0 #132

Merged
merged 3 commits into from
Nov 23, 2020
Merged

Conversation

wuzi
Copy link
Contributor

@wuzi wuzi commented Nov 22, 2020

This PR allows to use retryDelay as 0. Currently if the value is 0 it will use the default value (100).

Got the idea after using retryDelay: 0 and wondering why it was taking so long.

May cause backwards incompatibility?

Edit: Well, it didn't even pass the CI, so yes.

Edit 2: Changed to ternary operator.

@wuzi wuzi changed the title refactor: use nullish coalescing operator for retryDelay refactor: allow retryDelay to be 0 Nov 22, 2020
Copy link
Owner

@JustinBeckwith JustinBeckwith left a comment

Choose a reason for hiding this comment

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

This is awesome, thank you! Any interest in writing a test to verify the 0 based timeout works as expected? Otherwise, very likely I accidentally break this down the road 😆

src/index.ts Show resolved Hide resolved
@wuzi
Copy link
Contributor Author

wuzi commented Nov 23, 2020

This is awesome, thank you! Any interest in writing a test to verify the 0 based timeout works as expected? Otherwise, very likely I accidentally break this down the road

Sure!

@JustinBeckwith JustinBeckwith changed the title refactor: allow retryDelay to be 0 feat: allow retryDelay to be 0 Nov 23, 2020
@JustinBeckwith JustinBeckwith merged commit 57ba46f into JustinBeckwith:master Nov 23, 2020
@github-actions
Copy link

🎉 This PR is included in version 2.4.0 🎉

The release is available on:

Your semantic-release bot 📦🚀

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants