should also check if action status publisher is ready. (#541)
Signed-off-by: Tomoya.Fujita <Tomoya.Fujita@sony.com>
This commit is contained in:
parent
8cf33b3ad0
commit
80340c8b5a
1 changed files with 7 additions and 0 deletions
|
@ -284,6 +284,13 @@ rcl_action_server_is_available(
|
|||
}
|
||||
*is_available = *is_available && (number_of_publishers != 0);
|
||||
|
||||
ret = rcl_subscription_get_publisher_count(
|
||||
&(client->impl->status_subscription), &number_of_publishers);
|
||||
if (RCL_RET_OK != ret) {
|
||||
return ret; // error is already set
|
||||
}
|
||||
*is_available = *is_available && (number_of_publishers != 0);
|
||||
|
||||
return RCL_RET_OK;
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue