diff --git a/include/ros1_bridge/action_factory.hpp b/include/ros1_bridge/action_factory.hpp index 3e91d0d7..ce82a2cf 100644 --- a/include/ros1_bridge/action_factory.hpp +++ b/include/ros1_bridge/action_factory.hpp @@ -139,9 +139,8 @@ class ActionFactory_1_2 : public ActionFactoryInterface //Changes as per Dashing auto send_goal_ops = ROS2SendGoalOptions(); send_goal_ops.goal_response_callback = - [this](auto gh2_future) mutable { - auto goal_handle = gh2_future.get(); - if (!goal_handle) + [this](auto gh2) mutable { + if (!gh2) { gh1_.setRejected(); // goal was not accepted by remote server return; @@ -151,7 +150,7 @@ class ActionFactory_1_2 : public ActionFactoryInterface { std::lock_guard lock(mutex_); - gh2_ = goal_handle; + gh2_ = gh2; if (canceled_) { // cancel was called in between