ros2 / rmw_fastrtps

Implementation of the ROS Middleware (rmw) Interface using eProsima's Fast RTPS.
Apache License 2.0
157 stars 117 forks source link

Call callbacks only if unread count > 0 #634

Closed mauropasse closed 2 years ago

mauropasse commented 2 years ago

Listener callbacks for QoS events were being called when assigned.

They should be called here only if there were previous events before setting these callbacks.

This PR checks the total_count_change for each event, and if greater than zero, call the corresponding callback.

Signed-off-by: Mauro Passerino mpasserino@irobot.com

fujitatomoya commented 2 years ago

CI:

clalancette commented 2 years ago

Green CI and approved, so merging.

fujitatomoya commented 2 years ago

@mergifyio backport humble

mergify[bot] commented 2 years ago

backport humble

✅ Backports have been created

* [#638 Call callbacks only if unread count > 0 (backport #634)](https://github.com/ros2/rmw_fastrtps/pull/638) has been created for branch `humble`