Skip to content

Commit

Permalink
Enable history option for liveliness subscriber. (#27)
Browse files Browse the repository at this point in the history
Signed-off-by: ChenYing Kuo <[email protected]>
  • Loading branch information
evshary authored Oct 8, 2024
1 parent 93e733f commit eeb9985
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions rmw_zenoh_cpp/src/detail/rmw_context_impl_s.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -120,6 +120,9 @@ rmw_ret_t rmw_context_impl_s::Data::subscribe_to_ros_graph()
// shared_ptr<Data> would live on until the graph_sub_data_handler callback.
zc_liveliness_subscriber_options_t sub_options;
zc_liveliness_subscriber_options_default(&sub_options);
// Enable history option to retrieve the old graph info in case there is
// something updated after getting the graph info.
sub_options.history = true;
z_owned_closure_sample_t callback;
z_closure(&callback, graph_sub_data_handler, nullptr, this);
z_view_keyexpr_t keyexpr;
Expand Down

0 comments on commit eeb9985

Please sign in to comment.