diff --git a/rclcpp/src/rclcpp/experimental/executors/events_executor/events_executor.cpp b/rclcpp/src/rclcpp/experimental/executors/events_executor/events_executor.cpp index e8a6e1889c..322102cb65 100644 --- a/rclcpp/src/rclcpp/experimental/executors/events_executor/events_executor.cpp +++ b/rclcpp/src/rclcpp/experimental/executors/events_executor/events_executor.cpp @@ -408,8 +408,16 @@ EventsExecutor::refresh_current_collection( [this](auto waitable) { waitable->set_on_ready_callback( this->create_waitable_callback(waitable.get())); + for (const auto & t : waitable->get_timers()) { + timers_manager_->add_timer(t); + } }, - [](auto waitable) {waitable->clear_on_ready_callback();}); + [this](auto waitable) { + waitable->clear_on_ready_callback(); + for (const auto & t : waitable->get_timers()) { + timers_manager_->remove_timer(t); + } + }); } std::function