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

Disallow backoff.Config.MinBackoff to be zero #395

Open
tpaschalis opened this issue Oct 9, 2023 · 0 comments
Open

Disallow backoff.Config.MinBackoff to be zero #395

tpaschalis opened this issue Oct 9, 2023 · 0 comments

Comments

@tpaschalis
Copy link
Member

Currently, we don't perform any kind of validation in the configuration that is passed to create a new Backoff object.

Passing a minBackoff of zero means that both nextDelayMin and nextDelayMax will be set to zero, meaning that NextDelay is also always zero and that we'll never wait for a meaningful amount of time.

At the very least we can document this kind of behavior, but I believe that adding some rudimentary validation of the configuration passed shouldn't be too much overhead.

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

No branches or pull requests

1 participant