rmw_destroy_node must remove node from graph cache (#252)

Signed-off-by: Erik Boasson <eb@ilities.com>

Co-authored-by: Erik Boasson <eb@ilities.com>
This commit is contained in:
Jacob Perron 2020-10-06 09:49:16 -07:00 committed by GitHub
parent e0bfe46474
commit 6f9a61474f
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -1266,7 +1266,7 @@ extern "C" rmw_ret_t rmw_destroy_node(rmw_node_t * node)
auto common = &node->context->impl->common; auto common = &node->context->impl->common;
std::lock_guard<std::mutex> guard(common->node_update_mutex); std::lock_guard<std::mutex> guard(common->node_update_mutex);
rmw_dds_common::msg::ParticipantEntitiesInfo participant_msg = rmw_dds_common::msg::ParticipantEntitiesInfo participant_msg =
common->graph_cache.add_node(common->gid, node->name, node->namespace_); common->graph_cache.remove_node(common->gid, node->name, node->namespace_);
result_ret = rmw_publish( result_ret = rmw_publish(
common->pub, static_cast<void *>(&participant_msg), nullptr); common->pub, static_cast<void *>(&participant_msg), nullptr);
} }