diff --git a/rcl_action/include/rcl_action/action_server.h b/rcl_action/include/rcl_action/action_server.h index eb4f95ce9..24321f295 100644 --- a/rcl_action/include/rcl_action/action_server.h +++ b/rcl_action/include/rcl_action/action_server.h @@ -320,6 +320,7 @@ rcl_action_take_goal_request( * \return `RCL_RET_OK` if the response was sent successfully, or * \return `RCL_RET_INVALID_ARGUMENT` if any arguments are invalid, or * \return `RCL_RET_ACTION_SERVER_INVALID` if the action server is invalid, or + * \return `RCL_RET_TIMEOUT` if a goal response reader is not ready yet, or * \return `RCL_RET_ERROR` if an unspecified error occurs. */ RCL_ACTION_PUBLIC @@ -564,6 +565,7 @@ rcl_action_take_result_request( * \return `RCL_RET_OK` if the response was sent successfully, or * \return `RCL_RET_INVALID_ARGUMENT` if any arguments are invalid, or * \return `RCL_RET_ACTION_SERVER_INVALID` if the action server is invalid, or + * \return `RCL_RET_TIMEOUT` if a result response reader is not ready yet, or * \return `RCL_RET_ERROR` if an unspecified error occurs. */ RCL_ACTION_PUBLIC @@ -753,6 +755,7 @@ rcl_action_process_cancel_request( * \return `RCL_RET_OK` if the request was taken, or * \return `RCL_RET_INVALID_ARGUMENT` if any arguments are invalid, or * \return `RCL_RET_ACTION_SERVER_INVALID` if the action server is invalid, or + * \return `RCL_RET_TIMEOUT` if a cancel response reader is not ready yet, or * \return `RCL_RET_ERROR` if an unspecified error occurs. */ RCL_ACTION_PUBLIC diff --git a/rcl_action/src/rcl_action/action_server.c b/rcl_action/src/rcl_action/action_server.c index 63580c40f..17908d1da 100644 --- a/rcl_action/src/rcl_action/action_server.c +++ b/rcl_action/src/rcl_action/action_server.c @@ -299,7 +299,11 @@ rcl_action_server_get_default_options(void) rcl_ret_t ret = rcl_send_response( \ &action_server->impl->Type ## _service, response_header, response); \ if (RCL_RET_OK != ret) { \ - return RCL_RET_ERROR; /* error already set */ \ + if (RCL_RET_TIMEOUT == ret) { \ + return RCL_RET_TIMEOUT; /* error already set */ \ + } else { \ + return RCL_RET_ERROR; /* error already set */ \ + } \ } \ return RCL_RET_OK; \