Skip to content

Commit

Permalink
fix(socket): limit exp backoff to 16 retries
Browse files Browse the repository at this point in the history
  • Loading branch information
mempirate committed Jan 19, 2024
1 parent c5bfee6 commit 13d9d94
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion msg-socket/src/req/socket.rs
Original file line number Diff line number Diff line change
Expand Up @@ -71,7 +71,7 @@ where

tracing::info!("Connecting to {}", endpoint);

let mut backoff = ExponentialBackoff::new(Duration::from_millis(20), 256);
let mut backoff = ExponentialBackoff::new(Duration::from_millis(20), 16);

let mut stream = loop {
if let Some(duration) = backoff.next().await {
Expand Down
2 changes: 1 addition & 1 deletion msg-socket/src/sub/driver.rs
Original file line number Diff line number Diff line change
Expand Up @@ -114,7 +114,7 @@ where
addr,
PublisherState::Inactive {
addr,
backoff: ExponentialBackoff::new(Duration::from_millis(10), 256),
backoff: ExponentialBackoff::new(Duration::from_millis(10), 16),
},
);
}
Expand Down

0 comments on commit 13d9d94

Please sign in to comment.