-
Notifications
You must be signed in to change notification settings - Fork 76
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
Conversation
ic-agent/src/agent/mod.rs
Outdated
Box::pin(async move { | ||
loop { | ||
#[cfg(not(target_family = "wasm"))] | ||
let resp = self.client.call(req, _max_retries).await?; |
There was a problem hiding this comment.
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?
There was a problem hiding this comment.
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?
ic-gateway was broken by #586, this provides a middle ground for them.