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

Add timeout to token refresh retry #123

Merged
merged 3 commits into from
Dec 13, 2024
Merged

Add timeout to token refresh retry #123

merged 3 commits into from
Dec 13, 2024

Conversation

DoumanAsh
Copy link
Contributor

Fixes #122

Copy link
Owner

@djc djc left a comment

Choose a reason for hiding this comment

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

Thanks for looking at this!

src/types.rs Outdated Show resolved Hide resolved
@djc
Copy link
Owner

djc commented Dec 13, 2024

(If you rebase, the MSRV failure in CI should go away.)

@DoumanAsh
Copy link
Contributor Author

Rebase PR and applied comments
I'm not sure if it is good idea to use sleep in asyn code, so I kept tokio's sleep

@DoumanAsh
Copy link
Contributor Author

DoumanAsh commented Dec 13, 2024

@djc One question
Why HTTP request is using Error::Other variant when it has hyper's error?

.map_err(|err| Error::Other("HTTP request failed", Box::new(err)))?

UPD: nevermind, hyper-util uses own error type

@djc djc merged commit 565ebc6 into djc:main Dec 13, 2024
6 checks passed
@djc
Copy link
Owner

djc commented Dec 13, 2024

Thanks!

@DoumanAsh DoumanAsh deleted the fix_bad_retry branch December 13, 2024 10:00
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.

Token fetch retry mechanism should use some timeout
2 participants