fix expired goals capacity of action server (#931) (#957)

Signed-off-by: Kentaro Tanaka <spiralray@gmail.com>
(cherry picked from commit eae50c9ed16c0b2fa4c7ca2c92bb8c30d5f6836f)

Co-authored-by: spiralray <spiralray@users.noreply.github.com>
This commit is contained in:
mergify[bot] 2022-02-04 08:26:12 -08:00 committed by GitHub
parent 131ab43a32
commit 73126fe7ad
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -602,7 +602,7 @@ rcl_action_expire_goals(
int64_t goal_time;
size_t num_goal_handles = action_server->impl->num_goal_handles;
for (size_t i = 0u; i < num_goal_handles; ++i) {
if (output_expired && i >= expired_goals_capacity) {
if (output_expired && num_goals_expired >= expired_goals_capacity) {
// no more space to output expired goals, so stop expiring them
break;
}