diff --git a/zenoh/src/api/session.rs b/zenoh/src/api/session.rs index 199989692d..6a939e9fa3 100644 --- a/zenoh/src/api/session.rs +++ b/zenoh/src/api/session.rs @@ -1077,11 +1077,14 @@ impl SessionInner { let mut state = zwrite!(self.state); state.queryables.clear(); state.subscribers.clear(); - state.matching_listeners.clear(); state.liveliness_subscribers.clear(); state.local_resources.clear(); state.remote_resources.clear(); - state.tokens.clear(); + #[cfg(feature = "unstable")] + { + state.tokens.clear(); + state.matching_listeners.clear(); + } Ok(()) }) }