Skip to content

Commit

Permalink
Fix actions feedback race
Browse files Browse the repository at this point in the history
 - See ros2#2451

Signed-off-by: Mauro Passerino <mpasserino@irobot.com>
  • Loading branch information
Mauro Passerino committed Aug 27, 2024
1 parent c79c3d9 commit 33d1e2a
Showing 1 changed file with 10 additions and 10 deletions.
20 changes: 10 additions & 10 deletions rclcpp_action/src/client.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -353,16 +353,6 @@ ClientBase::is_ready(const rcl_wait_set_t & wait_set)

pimpl_->next_ready_event = std::numeric_limits<size_t>::max();

if (is_feedback_ready) {
pimpl_->next_ready_event = static_cast<size_t>(EntityType::FeedbackSubscription);
return true;
}

if (is_status_ready) {
pimpl_->next_ready_event = static_cast<size_t>(EntityType::StatusSubscription);
return true;
}

if (is_goal_response_ready) {
pimpl_->next_ready_event = static_cast<size_t>(EntityType::GoalClient);
return true;
Expand All @@ -378,6 +368,16 @@ ClientBase::is_ready(const rcl_wait_set_t & wait_set)
return true;
}

if (is_feedback_ready) {
pimpl_->next_ready_event = static_cast<size_t>(EntityType::FeedbackSubscription);
return true;
}

if (is_status_ready) {
pimpl_->next_ready_event = static_cast<size_t>(EntityType::StatusSubscription);
return true;
}

return false;
}

Expand Down

0 comments on commit 33d1e2a

Please sign in to comment.