Skip to content
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

Fix backoff timeouts #23

Merged
merged 2 commits into from
Oct 23, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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
Loading