Skip to content

Commit

Permalink
Improve node graph delivery by using a unique listening port (#711)
Browse files Browse the repository at this point in the history
* Improve node graph delivery by using a unique listening port.

Signed-off-by: Miguel Company <[email protected]>
  • Loading branch information
MiguelCompany authored Sep 14, 2023
1 parent 71b5b99 commit b6c069c
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 2 deletions.
5 changes: 4 additions & 1 deletion rmw_fastrtps_cpp/src/init_rmw_context_impl.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -48,8 +48,11 @@ init_context_impl(
rmw_publisher_options_t publisher_options = rmw_get_default_publisher_options();
rmw_subscription_options_t subscription_options = rmw_get_default_subscription_options();

// This is currently not implemented in fastrtps
// Avoid receiving graph updates from our own publication
subscription_options.ignore_local_publications = true;
// Improve graph discovery by using a unique listening port for its subscription
subscription_options.require_unique_network_flow_endpoints =
RMW_UNIQUE_NETWORK_FLOW_ENDPOINTS_OPTIONALLY_REQUIRED;

std::unique_ptr<rmw_dds_common::Context> common_context(
new(std::nothrow) rmw_dds_common::Context());
Expand Down
5 changes: 4 additions & 1 deletion rmw_fastrtps_dynamic_cpp/src/init_rmw_context_impl.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -48,8 +48,11 @@ init_context_impl(
rmw_publisher_options_t publisher_options = rmw_get_default_publisher_options();
rmw_subscription_options_t subscription_options = rmw_get_default_subscription_options();

// This is currently not implemented in fastrtps
// Avoid receiving graph updates from our own publication
subscription_options.ignore_local_publications = true;
// Improve graph discovery by using a unique listening port for its subscription
subscription_options.require_unique_network_flow_endpoints =
RMW_UNIQUE_NETWORK_FLOW_ENDPOINTS_OPTIONALLY_REQUIRED;

std::unique_ptr<rmw_dds_common::Context> common_context(
new(std::nothrow) rmw_dds_common::Context());
Expand Down

0 comments on commit b6c069c

Please sign in to comment.