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

Fixing sleep interval that compounds #216

Merged
merged 1 commit into from
May 16, 2023

Conversation

LorenzoLeonardo
Copy link
Contributor

It was observe that during polling of token, if an error keeps returning from the http_client, the sleep interval compounds by 2. This scenario can be reproduced if ethernet cable is unplugged for a long time not more than the expiry time.

To reproduced, set up a custom curl http_client with connect_timeout() and timeout() from Easy2 curl-rust crate.

Thus, a max back off interval is introduce to up a limit to the compounding of time interval.

It was observe that during polling of token, if an error
keeps returning from the http_client, the sleep interval
compounds by 2. This scenario can be reproduced if ethernet cable is
unplugged for a long time not more than the expiry time.

To reproduced, set up a custom curl http_client with connect_timeout()
and timeout() from Easy2 curl-rust crate.

Thus, a max back off interval is introduce to put a limit to
the compounding of time interval.
@LorenzoLeonardo
Copy link
Contributor Author

LorenzoLeonardo commented May 16, 2023

@ramosbugs solution for issue #214. Please check

@ramosbugs ramosbugs merged commit 1472310 into ramosbugs:main May 16, 2023
@ramosbugs
Copy link
Owner

thanks!

@LorenzoLeonardo
Copy link
Contributor Author

LorenzoLeonardo commented May 16, 2023 via email

@ramosbugs
Copy link
Owner

4.4.0 is now published

@LorenzoLeonardo
Copy link
Contributor Author

Thank you very much.

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.

2 participants