Skip to content

Commit d444e09

Browse files
committed
Set the result awareness to false if goal handle is invalidated
This will cause an exception when trying to get the future to result, in addition to the exception when trying to access values for existing references to the future. Signed-off-by: Jacob Perron <[email protected]>
1 parent 81239f1 commit d444e09

1 file changed

Lines changed: 1 addition & 0 deletions

File tree

rclcpp_action/include/rclcpp_action/client_goal_handle_impl.hpp

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -149,6 +149,7 @@ ClientGoalHandle<ActionT>::invalidate()
149149
{
150150
std::lock_guard<std::mutex> guard(handle_mutex_);
151151
status_ = GoalStatus::STATUS_UNKNOWN;
152+
is_result_aware_ = false;
152153
result_promise_.set_exception(std::make_exception_ptr(exceptions::UnawareGoalHandleError()));
153154
}
154155

0 commit comments

Comments
 (0)