--- a/include/nav2_util/lifecycle_node.hpp +++ b/include/nav2_util/lifecycle_node.hpp @@ -204,7 +204,7 @@ void runCleanups(); // Connection to tell that server is still up - std::unique_ptr bond_{nullptr}; + std::shared_ptr bond_{nullptr}; }; } // namespace nav2_util --- a/src/lifecycle_node.cpp +++ b/src/lifecycle_node.cpp @@ -57,7 +57,7 @@ { RCLCPP_INFO(get_logger(), "Creating bond (%s) to lifecycle manager.", this->get_name()); - bond_ = std::make_unique( + bond_ = std::make_shared( std::string("bond"), this->get_name(), shared_from_this());