Skip to content

Commit 7cecd86

Browse files
Fix wrong error log in linkstate peers (#1951)
1 parent 63a6e33 commit 7cecd86

File tree

1 file changed

+9
-5
lines changed
  • zenoh/src/net/routing/hat/linkstate_peer

1 file changed

+9
-5
lines changed

zenoh/src/net/routing/hat/linkstate_peer/mod.rs

Lines changed: 9 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -438,11 +438,15 @@ impl HatBaseTrait for HatCode {
438438
face: &FaceState,
439439
routing_context: NodeId,
440440
) -> NodeId {
441-
hat!(tables)
442-
.linkstatepeers_net
443-
.as_ref()
444-
.unwrap()
445-
.get_local_context(routing_context, face_hat!(face).link_id)
441+
if face.whatami != WhatAmI::Client {
442+
hat!(tables)
443+
.linkstatepeers_net
444+
.as_ref()
445+
.unwrap()
446+
.get_local_context(routing_context, face_hat!(face).link_id)
447+
} else {
448+
0
449+
}
446450
}
447451

448452
#[inline]

0 commit comments

Comments
 (0)