diff --git a/msg-transport/src/durable/session.rs b/msg-transport/src/durable/session.rs index 5689ac3..abdfe33 100644 --- a/msg-transport/src/durable/session.rs +++ b/msg-transport/src/durable/session.rs @@ -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(_) => { diff --git a/msg/Cargo.toml b/msg/Cargo.toml index 3123657..899f53b 100644 --- a/msg/Cargo.toml +++ b/msg/Cargo.toml @@ -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