Skip to content

Commit

Permalink
fix bug modulo
Browse files Browse the repository at this point in the history
  • Loading branch information
blind-oracle committed Sep 2, 2024
1 parent d745b66 commit 77a3ca6
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/http/client.rs
Original file line number Diff line number Diff line change
Expand Up @@ -112,7 +112,7 @@ impl ReqwestClientRoundRobin {
#[async_trait]
impl Client for ReqwestClientRoundRobin {
async fn execute(&self, req: reqwest::Request) -> Result<reqwest::Response, reqwest::Error> {
let next = self.inner.next.fetch_add(1, Ordering::SeqCst);
let next = self.inner.next.fetch_add(1, Ordering::SeqCst) % self.inner.cli.len();
self.inner.cli[next].execute(req).await
}
}
Expand Down

0 comments on commit 77a3ca6

Please sign in to comment.