diff --git a/zenoh/src/net/routing/hat/linkstate_peer/pubsub.rs b/zenoh/src/net/routing/hat/linkstate_peer/pubsub.rs index 135f899656..67b04661c6 100644 --- a/zenoh/src/net/routing/hat/linkstate_peer/pubsub.rs +++ b/zenoh/src/net/routing/hat/linkstate_peer/pubsub.rs @@ -622,7 +622,7 @@ impl HatPubSubTrait for HatCode { aggregate: bool, ) { if mode.current() && face.whatami == WhatAmI::Client { - let interest_id = mode.future().then_some(id); + let interest_id = (!mode.future()).then_some(id); let sub_info = SubscriberInfo { reliability: Reliability::Reliable, // @TODO compute proper reliability to propagate from reliability of known subscribers }; diff --git a/zenoh/src/net/routing/hat/linkstate_peer/queries.rs b/zenoh/src/net/routing/hat/linkstate_peer/queries.rs index 3d9babbd5d..9c3d502e5f 100644 --- a/zenoh/src/net/routing/hat/linkstate_peer/queries.rs +++ b/zenoh/src/net/routing/hat/linkstate_peer/queries.rs @@ -695,7 +695,7 @@ impl HatQueriesTrait for HatCode { aggregate: bool, ) { if mode.current() && face.whatami == WhatAmI::Client { - let interest_id = mode.future().then_some(id); + let interest_id = (!mode.future()).then_some(id); if let Some(res) = res.as_ref() { if aggregate { if hat!(tables).peer_qabls.iter().any(|qabl| { diff --git a/zenoh/src/net/routing/hat/p2p_peer/pubsub.rs b/zenoh/src/net/routing/hat/p2p_peer/pubsub.rs index 69cb1619b7..e46ff3ff16 100644 --- a/zenoh/src/net/routing/hat/p2p_peer/pubsub.rs +++ b/zenoh/src/net/routing/hat/p2p_peer/pubsub.rs @@ -375,7 +375,7 @@ impl HatPubSubTrait for HatCode { aggregate: bool, ) { if mode.current() && face.whatami == WhatAmI::Client { - let interest_id = mode.future().then_some(id); + let interest_id = (!mode.future()).then_some(id); let sub_info = SubscriberInfo { reliability: Reliability::Reliable, // @TODO compute proper reliability to propagate from reliability of known subscribers }; diff --git a/zenoh/src/net/routing/hat/p2p_peer/queries.rs b/zenoh/src/net/routing/hat/p2p_peer/queries.rs index e986cfa16e..caa5f79694 100644 --- a/zenoh/src/net/routing/hat/p2p_peer/queries.rs +++ b/zenoh/src/net/routing/hat/p2p_peer/queries.rs @@ -353,7 +353,7 @@ impl HatQueriesTrait for HatCode { aggregate: bool, ) { if mode.current() && face.whatami == WhatAmI::Client { - let interest_id = mode.future().then_some(id); + let interest_id = (!mode.future()).then_some(id); if let Some(res) = res.as_ref() { if aggregate { if tables.faces.values().any(|src_face| { diff --git a/zenoh/src/net/routing/hat/router/pubsub.rs b/zenoh/src/net/routing/hat/router/pubsub.rs index 3bfb0fdd6f..2af567d989 100644 --- a/zenoh/src/net/routing/hat/router/pubsub.rs +++ b/zenoh/src/net/routing/hat/router/pubsub.rs @@ -922,7 +922,7 @@ impl HatPubSubTrait for HatCode { aggregate: bool, ) { if mode.current() && face.whatami == WhatAmI::Client { - let interest_id = mode.future().then_some(id); + let interest_id = (!mode.future()).then_some(id); let sub_info = SubscriberInfo { reliability: Reliability::Reliable, // @TODO compute proper reliability to propagate from reliability of known subscribers }; diff --git a/zenoh/src/net/routing/hat/router/queries.rs b/zenoh/src/net/routing/hat/router/queries.rs index 72e3a781e5..9a2beeb001 100644 --- a/zenoh/src/net/routing/hat/router/queries.rs +++ b/zenoh/src/net/routing/hat/router/queries.rs @@ -1078,7 +1078,7 @@ impl HatQueriesTrait for HatCode { aggregate: bool, ) { if mode.current() && face.whatami == WhatAmI::Client { - let interest_id = mode.future().then_some(id); + let interest_id = (!mode.future()).then_some(id); if let Some(res) = res.as_ref() { if aggregate { if hat!(tables).router_qabls.iter().any(|qabl| {