Skip to content

Commit

Permalink
Revert to blocking channel for liveliness_get
Browse files Browse the repository at this point in the history
Signed-off-by: Yadunund <[email protected]>
  • Loading branch information
Yadunund committed Jan 26, 2024
1 parent 5c2b179 commit 78ab5a1
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions rmw_zenoh_cpp/src/rmw_init.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -251,12 +251,12 @@ rmw_init(const rmw_init_options_t * options, rmw_context_t * context)

// Query router/liveliness participants to get graph information before this session was started.

// We create a non-blocking channel that is unbounded, ie. `bound` = 0, to receive
// We create a blocking channel that is unbounded, ie. `bound` = 0, to receive
// replies for the zc_liveliness_get() call. This is necessary as if the `bound`
// is too low, the channel may starve the zenoh executor of its threads which
// would lead to deadlocks when trying to receive replies and block the
// execution here.
z_owned_reply_channel_t channel = zc_reply_non_blocking_fifo_new(0);
z_owned_reply_channel_t channel = zc_reply_fifo_new(0);
zc_liveliness_get(
z_loan(context->impl->session), z_keyexpr(liveliness_str.c_str()),
z_move(channel.send), NULL);
Expand Down

0 comments on commit 78ab5a1

Please sign in to comment.