Skip to content

Commit

Permalink
Merge branch 'igornovg/new-agent' of github.com:dfinity/ic-gateway in…
Browse files Browse the repository at this point in the history
…to igornovg/new-agent
  • Loading branch information
blind-oracle committed Nov 20, 2024
2 parents b43aa67 + 3cc9f6a commit ebb2669
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion src/routing/ic/http_service.rs
Original file line number Diff line number Diff line change
Expand Up @@ -88,7 +88,8 @@ impl HttpService for AgentHttpService {
match self.execute(request).await {
Ok(v) => {
// Retry only on 429 for now
if v.status() != StatusCode::TOO_MANY_REQUESTS || retry >= max_retries {
let should_retry = v.status() == StatusCode::TOO_MANY_REQUESTS && retry < max_retries;
if !should_retry {
return Ok(v);
}
}
Expand Down

0 comments on commit ebb2669

Please sign in to comment.