Skip to content

Commit

Permalink
Merge pull request #23 from chainbound/fix/backoff-timeout
Browse files Browse the repository at this point in the history
Fix backoff timeouts
  • Loading branch information
merklefruit authored Oct 23, 2023
2 parents 817b9cc + e58a8b7 commit 3929e4e
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 6 deletions.
12 changes: 10 additions & 2 deletions msg-transport/src/durable/session.rs
Original file line number Diff line number Diff line change
Expand Up @@ -181,10 +181,18 @@ where
reconnect_status.current_attempt = Some(attempt);
}
SessionState::Processing(_) => {
error!("Session was disconnected from {}", self.endpoint);
error!(
"Session was disconnected from {} during processing stage",
self.endpoint
);
let attempt = Box::pin(async move {
tokio::time::sleep(Duration::from_millis(100)).await;
Io::establish(endpoint).await
});

self.state = SessionState::Disconnected(ReconnectStatus {
attempts: 0,
current_attempt: Some(Io::establish(self.endpoint)),
current_attempt: Some(attempt),
});
}
SessionState::Terminated(_) => {
Expand Down
4 changes: 0 additions & 4 deletions msg/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -30,10 +30,6 @@ futures.workspace = true
tracing.workspace = true
rand.workspace = true

[[bench]]
name = "req_res_localhost"
harness = false

[[bench]]
name = "reqrep"
harness = false
Expand Down

0 comments on commit 3929e4e

Please sign in to comment.