Skip to content

Commit

Permalink
Change goal response callback type from future to shared ptr
Browse files Browse the repository at this point in the history
  • Loading branch information
Victor Lopez committed Nov 13, 2020
1 parent 9c471ba commit 590783e
Showing 1 changed file with 3 additions and 4 deletions.
7 changes: 3 additions & 4 deletions include/ros1_bridge/action_factory.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand All @@ -151,7 +150,7 @@ class ActionFactory_1_2 : public ActionFactoryInterface

{
std::lock_guard<std::mutex> lock(mutex_);
gh2_ = goal_handle;
gh2_ = gh2;

if (canceled_)
{ // cancel was called in between
Expand Down

0 comments on commit 590783e

Please sign in to comment.