diff --git a/include/nav2_util/lifecycle_node.hpp b/include/nav2_util/lifecycle_node.hpp index 6da348c..449a9db 100644 --- a/include/nav2_util/lifecycle_node.hpp +++ b/include/nav2_util/lifecycle_node.hpp @@ -204,7 +204,7 @@ protected: void runCleanups(); // Connection to tell that server is still up - std::unique_ptr bond_{nullptr}; + std::shared_ptr bond_{nullptr}; }; } // namespace nav2_util diff --git a/src/lifecycle_node.cpp b/src/lifecycle_node.cpp index e09ae54..ca9719d 100644 --- a/src/lifecycle_node.cpp +++ b/src/lifecycle_node.cpp @@ -57,7 +57,7 @@ void LifecycleNode::createBond() { 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());