From 8ff51833ad7bceeb4c4cb2bacfbe0de02da25e5e Mon Sep 17 00:00:00 2001 From: ivanpauno Date: Thu, 30 May 2019 15:54:02 -0300 Subject: [PATCH] =?UTF-8?q?Avoid=20'Intra=20process=20message=20no=20longe?= =?UTF-8?q?r=20being=20stored=20when=20trying=20to=20ha=E2=80=A6=20(#749)?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: ivanpauno --- rclcpp/include/rclcpp/subscription.hpp | 18 ++++++++++-------- 1 file changed, 10 insertions(+), 8 deletions(-) diff --git a/rclcpp/include/rclcpp/subscription.hpp b/rclcpp/include/rclcpp/subscription.hpp index dd044ae..0ba293e 100644 --- a/rclcpp/include/rclcpp/subscription.hpp +++ b/rclcpp/include/rclcpp/subscription.hpp @@ -178,10 +178,11 @@ public: intra_process_subscription_id_, msg); if (!msg) { - // This either occurred because the publisher no longer exists or the - // message requested is no longer being stored. - RCLCPP_WARN(get_logger("rclcpp"), - "Intra process message no longer being stored when trying to handle it"); + // This can happen when having two nodes in different process both using intraprocess + // communication. It could happen too if the publisher no longer exists or the requested + // message is not longer being stored. + // TODO(ivanpauno): Print a warn message in the last two cases described above, + // but not in the first one. return; } any_callback_.dispatch_intra_process(msg, message_info); @@ -193,10 +194,11 @@ public: intra_process_subscription_id_, msg); if (!msg) { - // This either occurred because the publisher no longer exists or the - // message requested is no longer being stored. - RCLCPP_WARN(get_logger("rclcpp"), - "Intra process message no longer being stored when trying to handle it"); + // This can happen when having two nodes in different process both using intraprocess + // communication. It could happen too if the publisher no longer exists or the requested + // message is not longer being stored. + // TODO(ivanpauno): Print a warn message in the last two cases described above, + // but not in the first one. return; } any_callback_.dispatch_intra_process(std::move(msg), message_info);