Skip to content

Commit

Permalink
Fix the triggering of guard conditions. (#504)
Browse files Browse the repository at this point in the history
When a guard condition goes active, we have to remember
to increase the trig_idx so we look at the next trigger.
Otherwise, we can get into situations where we skip a
triggered member.

Signed-off-by: Chris Lalancette <[email protected]>
  • Loading branch information
clalancette authored Jul 11, 2024
1 parent 3ec2d7a commit 899bbdf
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions rmw_cyclonedds_cpp/src/rmw_node.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -4492,6 +4492,7 @@ extern "C" rmw_ret_t rmw_wait(
if (ws->trigs[trig_idx] == static_cast<dds_attach_t>(nelems)) {
bool dummy;
dds_take_guardcondition(x->gcondh, &dummy);
trig_idx++;
} else {
gcs->guard_conditions[i] = nullptr;
}
Expand Down

0 comments on commit 899bbdf

Please sign in to comment.