Skip to content

Commit

Permalink
Make sure callback_end tracepoint is triggered in AnyServiceCallback (#…
Browse files Browse the repository at this point in the history
…2670)

Signed-off-by: Christophe Bedard <[email protected]>
  • Loading branch information
christophebedard authored Nov 11, 2024
1 parent 1e6767a commit 88ebea9
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions rclcpp/include/rclcpp/any_service_callback.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -165,11 +165,13 @@ class AnyServiceCallback
if (std::holds_alternative<SharedPtrDeferResponseCallback>(callback_)) {
const auto & cb = std::get<SharedPtrDeferResponseCallback>(callback_);
cb(request_header, std::move(request));
TRACETOOLS_TRACEPOINT(callback_end, static_cast<const void *>(this));
return nullptr;
}
if (std::holds_alternative<SharedPtrDeferResponseCallbackWithServiceHandle>(callback_)) {
const auto & cb = std::get<SharedPtrDeferResponseCallbackWithServiceHandle>(callback_);
cb(service_handle, request_header, std::move(request));
TRACETOOLS_TRACEPOINT(callback_end, static_cast<const void *>(this));
return nullptr;
}
// auto response = allocate_shared<typename ServiceT::Response, Allocator>();
Expand Down

0 comments on commit 88ebea9

Please sign in to comment.