From 55d03125aabf1125839708c6d2b1d8706adc9e31 Mon Sep 17 00:00:00 2001 From: Yadunund Date: Thu, 3 Oct 2024 03:39:23 +0800 Subject: [PATCH] Continue shutting down all publishers if one fails Signed-off-by: Yadunund --- rmw_zenoh_cpp/src/detail/rmw_node_data.cpp | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/rmw_zenoh_cpp/src/detail/rmw_node_data.cpp b/rmw_zenoh_cpp/src/detail/rmw_node_data.cpp index 5ab4cb37..5de83a4f 100644 --- a/rmw_zenoh_cpp/src/detail/rmw_node_data.cpp +++ b/rmw_zenoh_cpp/src/detail/rmw_node_data.cpp @@ -198,7 +198,13 @@ rmw_ret_t NodeData::shutdown() for (auto pub_it = pubs_.begin(); pub_it != pubs_.end(); ++pub_it) { ret = pub_it->second->shutdown(); if (ret != RMW_RET_OK) { - return ret; + RMW_ZENOH_LOG_ERROR_NAMED( + "rmw_zenoh_cpp", + "Unable to shutdown publisher %s within id %zu. rmw_ret_t code: %zu.", + pub_it->second->topic_info().name_.c_str(), + id_, + ret + ); } }