From 7220e9d746ddcbbf81f1ef825a820cb8c2bc31b8 Mon Sep 17 00:00:00 2001 From: Geoff Martin Date: Wed, 2 Oct 2024 15:16:05 +0100 Subject: [PATCH] Updated Zenoh subscriber declaration to undeclare subscribers when references are dropped. --- zenoh-plugin-dds/src/route_zenoh_dds.rs | 2 ++ 1 file changed, 2 insertions(+) diff --git a/zenoh-plugin-dds/src/route_zenoh_dds.rs b/zenoh-plugin-dds/src/route_zenoh_dds.rs index 3663f5e..5d03321 100644 --- a/zenoh-plugin-dds/src/route_zenoh_dds.rs +++ b/zenoh-plugin-dds/src/route_zenoh_dds.rs @@ -186,6 +186,7 @@ impl RouteZenohDDS<'_> { .zsession .declare_subscriber(ke.clone()) .callback(subscriber_callback) + .undeclare_on_drop(true) .allowed_origin(Locality::Remote) // Allow only remote publications to avoid loops .querying() .query_timeout(plugin.config.queries_timeout) @@ -203,6 +204,7 @@ impl RouteZenohDDS<'_> { .zsession .declare_subscriber(ke.clone()) .callback(subscriber_callback) + .undeclare_on_drop(true) .allowed_origin(Locality::Remote) // Allow only remote publications to avoid loops .await .map_err(|e| {