Skip to content

Commit

Permalink
spin_until_future_complete should wait on future, but result. (#4917)
Browse files Browse the repository at this point in the history
Signed-off-by: Tomoya Fujita <[email protected]>
  • Loading branch information
fujitatomoya authored Dec 26, 2024
1 parent 2f740f5 commit d76c9aa
Showing 1 changed file with 1 addition and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -215,7 +215,7 @@ Inside the ``ros2_ws/src/cpp_srvcli/src`` directory, create a new file called ``
request->a = 41;
request->b = 1;
auto result_future = client->async_send_request(request);
if (rclcpp::spin_until_future_complete(node, result) ==
if (rclcpp::spin_until_future_complete(node, result_future) ==
rclcpp::FutureReturnCode::SUCCESS)
{
RCLCPP_ERROR(node->get_logger(), "service call failed :(");
Expand Down

0 comments on commit d76c9aa

Please sign in to comment.