Skip to content

Commit

Permalink
Updated Zenoh subscriber and queryable declarations to undeclare enti…
Browse files Browse the repository at this point in the history
…ties when references are dropped. (#237)
  • Loading branch information
gmartin82 authored Oct 2, 2024
1 parent 62efa93 commit 34cc41d
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 0 deletions.
1 change: 1 addition & 0 deletions zenoh-plugin-mqtt/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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");

Expand Down
1 change: 1 addition & 0 deletions zenoh-plugin-mqtt/src/mqtt_session_state.rs
Original file line number Diff line number Diff line change
Expand Up @@ -83,6 +83,7 @@ impl MqttSessionState {
tracing::warn!("{}", e);
}
})
.undeclare_on_drop(true)
.allowed_origin(sub_origin)
.await?;
subs.insert(topic.into(), sub);
Expand Down

0 comments on commit 34cc41d

Please sign in to comment.