diff --git a/zenoh-plugin-mqtt/src/lib.rs b/zenoh-plugin-mqtt/src/lib.rs index 3f6b243..b3ac2fc 100644 --- a/zenoh-plugin-mqtt/src/lib.rs +++ b/zenoh-plugin-mqtt/src/lib.rs @@ -184,6 +184,7 @@ async fn run( let _admin_queryable = zsession .declare_queryable(admin_keyexpr_expr) .callback(move |query| treat_admin_query(query, &admin_keyexpr_prefix, &config2)) + .undeclare_on_drop(true) .await .expect("Failed to create AdminSpace queryable"); diff --git a/zenoh-plugin-mqtt/src/mqtt_session_state.rs b/zenoh-plugin-mqtt/src/mqtt_session_state.rs index 2457b4c..92772d0 100644 --- a/zenoh-plugin-mqtt/src/mqtt_session_state.rs +++ b/zenoh-plugin-mqtt/src/mqtt_session_state.rs @@ -83,6 +83,7 @@ impl MqttSessionState { tracing::warn!("{}", e); } }) + .undeclare_on_drop(true) .allowed_origin(sub_origin) .await?; subs.insert(topic.into(), sub);