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

feat: Add HTTP middleware for Transport replacement #598

Merged
merged 8 commits into from
Sep 26, 2024

Conversation

adamspofford-dfinity
Copy link
Contributor

ic-gateway was broken by #586, this provides a middle ground for them.

@adamspofford-dfinity adamspofford-dfinity marked this pull request as ready for review September 23, 2024 21:59
@adamspofford-dfinity adamspofford-dfinity requested a review from a team as a code owner September 23, 2024 21:59
Box::pin(async move {
loop {
#[cfg(not(target_family = "wasm"))]
let resp = self.client.call(req, _max_retries).await?;
Copy link
Contributor

Choose a reason for hiding this comment

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

Maybe add max_retries for 429 instead of retrying indefinitely?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

The reason for retrying 429s indefinitely is because you are not served them indefinitely - even though it means the semaphore isn't doing its job, your message backlog will eventually be cleared, or if it grows too much, then you'll start getting message expiry timeouts. Is this bad logic?

@adamspofford-dfinity adamspofford-dfinity merged commit 8967a7f into main Sep 26, 2024
24 checks passed
@adamspofford-dfinity adamspofford-dfinity deleted the spofford/generic-client branch September 26, 2024 18:05
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.

4 participants