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

ExponentialBackoff left shift overflow #4420

Closed
YaroShkvorets opened this issue Mar 5, 2023 · 0 comments
Closed

ExponentialBackoff left shift overflow #4420

YaroShkvorets opened this issue Mar 5, 2023 · 0 comments

Comments

@YaroShkvorets
Copy link
Contributor

Do you want to request a feature or report a bug?
bug

What is the current behavior?
When using ExponentialBackoff struct, it takes 32 attempts to overflow the left shift operator on u32 here.
With current parameters (base = 0.5s, ceiling = 45s) it takes about 20 minutes of missing internet connection for that to happen

If the current behavior is a bug, please provide the steps to reproduce and if possible a minimal demo of the problem.
Obvious looking at the code

What is the expected behavior?
Should continue with the delay == ceiling

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