Skip to content

Commit

Permalink
Bug/cancel action blocker (#542)
Browse files Browse the repository at this point in the history
* safe blocker bug on action cancellation

* format fix
  • Loading branch information
pabloinigoblasco committed Jun 1, 2024
1 parent c1fa655 commit 125347b
Showing 1 changed file with 2 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -100,6 +100,7 @@ class SmaccActionClientBase : public ISmaccActionClient

std::optional<std::shared_future<typename GoalHandle::SharedPtr>> lastRequest_;
// typename GoalHandle::SharedPtr goalHandle_;
std::optional<std::shared_future<typename CancelResponse::SharedPtr>> lastCancelResponse_;

SmaccActionResultSignal onSucceeded_;
SmaccActionResultSignal onAborted_;
Expand Down Expand Up @@ -217,8 +218,7 @@ class SmaccActionClientBase : public ISmaccActionClient

virtual bool cancelGoal() override
{
auto fut = this->client_->async_cancel_all_goals();
fut.wait();
lastCancelResponse_ = this->client_->async_cancel_all_goals();

// if (lastRequest_ && lastRequest_->valid())
// {
Expand Down

0 comments on commit 125347b

Please sign in to comment.