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

Feature request: allow retries for chunks #32

Closed
nick42d opened this issue Aug 3, 2024 · 1 comment · Fixed by #33
Closed

Feature request: allow retries for chunks #32

nick42d opened this issue Aug 3, 2024 · 1 comment · Fixed by #33
Labels
enhancement New feature or request

Comments

@nick42d
Copy link
Contributor

nick42d commented Aug 3, 2024

When looking to integrate the fix for the fix for #31 into my project, youtui, I noticed that even the individual chunks of a Stream can fail. To then retry streaming I need to start from the start again.

From what I can tell a simple way to resolve could be the addition of a new chunk_with_retries method on the Stream trait, since the requests inside NonLiveStream and LiveStream seem on first glance to be repeatable.

Let me know your thoughts and I'm happy to have a go with a PR.

@Mithronn Mithronn added the enhancement New feature or request label Aug 3, 2024
@Mithronn
Copy link
Owner

Mithronn commented Aug 3, 2024

This crate already uses the reqwest-retry crate but it only retries for 500..599, 408, and 429 status codes. I will publish a new commit with a new strategy which includes 400..499 and 500..599. But feel free to make new PR maybe your solution would be better

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants