From e6ffa30cdb74fcdca6a2206571eede0935835df6 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Ricardo=20Gonz=C3=A1lez=20Moreno?= Date: Wed, 13 Jul 2022 09:05:13 +0200 Subject: [PATCH] Fix waiting events --- rmw_fastrtps_shared_cpp/src/rmw_wait.cpp | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/rmw_fastrtps_shared_cpp/src/rmw_wait.cpp b/rmw_fastrtps_shared_cpp/src/rmw_wait.cpp index 46dc16369..e67b6c207 100644 --- a/rmw_fastrtps_shared_cpp/src/rmw_wait.cpp +++ b/rmw_fastrtps_shared_cpp/src/rmw_wait.cpp @@ -191,6 +191,15 @@ __rmw_wait( bool active = false; if (ReturnCode_t::RETCODE_OK == ret_code) { + eprosima::fastdds::dds::Entity * entity = status_condition.get_entity(); + eprosima::fastdds::dds::StatusMask changed_statuses = entity->get_status_changes(); + if (changed_statuses.is_active( + rmw_fastrtps_shared_cpp::internal::rmw_event_to_dds_statusmask( + event->event_type))) + { + active = true; + } + if (guard_condition->get_trigger_value()) { active = true; guard_condition->set_trigger_value(false);