Skip to content

Commit

Permalink
Fix liveliness bug (#802)
Browse files Browse the repository at this point in the history
  • Loading branch information
OlivierHecart authored Mar 8, 2024
1 parent 3328edb commit 2e79208
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 3 deletions.
3 changes: 2 additions & 1 deletion zenoh/src/net/routing/hat/client/pubsub.rs
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,8 @@ fn propagate_simple_subscription_to(
sub_info: &SubscriberInfo,
src_face: &mut Arc<FaceState>,
) {
if (src_face.id != dst_face.id || res.expr().starts_with(PREFIX_LIVELINESS))
if (src_face.id != dst_face.id
|| (dst_face.whatami == WhatAmI::Client && res.expr().starts_with(PREFIX_LIVELINESS)))
&& !face_hat!(dst_face).local_subs.contains(res)
&& (src_face.whatami == WhatAmI::Client || dst_face.whatami == WhatAmI::Client)
{
Expand Down
3 changes: 2 additions & 1 deletion zenoh/src/net/routing/hat/p2p_peer/pubsub.rs
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,8 @@ fn propagate_simple_subscription_to(
sub_info: &SubscriberInfo,
src_face: &mut Arc<FaceState>,
) {
if (src_face.id != dst_face.id || res.expr().starts_with(PREFIX_LIVELINESS))
if (src_face.id != dst_face.id
|| (dst_face.whatami == WhatAmI::Client && res.expr().starts_with(PREFIX_LIVELINESS)))
&& !face_hat!(dst_face).local_subs.contains(res)
&& (src_face.whatami == WhatAmI::Client || dst_face.whatami == WhatAmI::Client)
{
Expand Down
3 changes: 2 additions & 1 deletion zenoh/src/net/routing/hat/router/pubsub.rs
Original file line number Diff line number Diff line change
Expand Up @@ -87,7 +87,8 @@ fn propagate_simple_subscription_to(
src_face: &mut Arc<FaceState>,
full_peer_net: bool,
) {
if (src_face.id != dst_face.id || res.expr().starts_with(PREFIX_LIVELINESS))
if (src_face.id != dst_face.id
|| (dst_face.whatami == WhatAmI::Client && res.expr().starts_with(PREFIX_LIVELINESS)))
&& !face_hat!(dst_face).local_subs.contains(res)
&& if full_peer_net {
dst_face.whatami == WhatAmI::Client
Expand Down

0 comments on commit 2e79208

Please sign in to comment.