diff --git a/commons/zenoh-protocol/src/transport/close.rs b/commons/zenoh-protocol/src/transport/close.rs index b93fe6d6b6..e4029f09d6 100644 --- a/commons/zenoh-protocol/src/transport/close.rs +++ b/commons/zenoh-protocol/src/transport/close.rs @@ -65,6 +65,7 @@ pub mod reason { pub const MAX_SESSIONS: u8 = 0x03; pub const MAX_LINKS: u8 = 0x04; pub const EXPIRED: u8 = 0x05; + pub const UNRESPONSIVE: u8 = 0x06; } pub fn reason_to_str(reason: u8) -> &'static str { @@ -75,6 +76,7 @@ pub fn reason_to_str(reason: u8) -> &'static str { reason::MAX_SESSIONS => "MAX_SESSIONS", reason::MAX_LINKS => "MAX_LINKS", reason::EXPIRED => "EXPIRED", + reason::UNRESPONSIVE => "UNRESPONSIVE", _ => "UNKNOWN", } } diff --git a/io/zenoh-transport/src/unicast/universal/tx.rs b/io/zenoh-transport/src/unicast/universal/tx.rs index a241ecae61..6f61fc070d 100644 --- a/io/zenoh-transport/src/unicast/universal/tx.rs +++ b/io/zenoh-transport/src/unicast/universal/tx.rs @@ -121,7 +121,7 @@ impl TransportUnicastUniversal { zenoh_runtime::ZRuntime::RX.spawn({ let transport = self.clone(); async move { - if let Err(e) = transport.close(close::reason::GENERIC).await { + if let Err(e) = transport.close(close::reason::UNRESPONSIVE).await { tracing::error!( "Error closing transport with {}: {}", transport.config.zid,