From 9836e36cad67197c94584a5450d21125274b27d8 Mon Sep 17 00:00:00 2001 From: "mergify[bot]" <37929162+mergify[bot]@users.noreply.github.com> Date: Thu, 6 Mar 2025 10:14:14 +0100 Subject: [PATCH] Fix calculation of current_count_change when event status is updated (#504) (#507) Signed-off-by: Yadunund (cherry picked from commit ab251eaec787986d85bf94e1b8053e2c84807eda) Co-authored-by: yadunund --- rmw_zenoh_cpp/src/detail/event.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/rmw_zenoh_cpp/src/detail/event.cpp b/rmw_zenoh_cpp/src/detail/event.cpp index c54692d3..e5858ef6 100644 --- a/rmw_zenoh_cpp/src/detail/event.cpp +++ b/rmw_zenoh_cpp/src/detail/event.cpp @@ -182,7 +182,7 @@ void EventsManager::update_event_status( status_to_update.total_count += std::max(0, current_count_change); status_to_update.total_count_change += std::max(0, current_count_change); status_to_update.current_count += current_count_change; - status_to_update.current_count_change = current_count_change; + status_to_update.current_count_change += current_count_change; status_to_update.changed = true; }