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

ExponentialBackOffWithJitter algorithm not implemented as documented #338

Closed
smanousos opened this issue Jul 24, 2018 · 4 comments
Closed
Assignees

Comments

@smanousos
Copy link

azure-iot-common version 1.7.1, retry_policy.js line 93:
return Math.min(constants.cMin + (Math.pow(retryCount - 1, 2) - 1) * randomJitter, constants.cMax);

This uses (retryCount - 1)^2. To match the documentation it should be 2^(retryCount - 1)

@pierreca
Copy link
Contributor

@smanousos the PR is out - the fix will be part of our next release. That was an embarassing one... thanks for finding this!! I will update this issue when the fix is checked in and again when it is released.

@smanousos
Copy link
Author

"embarrassing": been there, done that.
thanx for the quick response!

pierreca pushed a commit to pierreca/azure-iot-sdk-node that referenced this issue Jul 27, 2018
pierreca pushed a commit to pierreca/azure-iot-sdk-node that referenced this issue Jul 27, 2018
@pierreca
Copy link
Contributor

pierreca commented Aug 9, 2018

packages were published (v1.7.2) with the fix included. Thanks a lot for reporting this!

@pierreca pierreca closed this as completed Aug 9, 2018
@az-iot-builder-01
Copy link
Collaborator

@smanousos, thank you for your contribution to our open-sourced project! Please help us improve by filling out this 2-minute customer satisfaction survey

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

No branches or pull requests

3 participants