Avoid 'Intra process message no longer being stored when trying to ha… (#749)
Signed-off-by: ivanpauno <ivanpauno@ekumenlabs.com>
This commit is contained in:
parent
347f8d0b1d
commit
8ff51833ad
1 changed files with 10 additions and 8 deletions
|
@ -178,10 +178,11 @@ public:
|
||||||
intra_process_subscription_id_,
|
intra_process_subscription_id_,
|
||||||
msg);
|
msg);
|
||||||
if (!msg) {
|
if (!msg) {
|
||||||
// This either occurred because the publisher no longer exists or the
|
// This can happen when having two nodes in different process both using intraprocess
|
||||||
// message requested is no longer being stored.
|
// communication. It could happen too if the publisher no longer exists or the requested
|
||||||
RCLCPP_WARN(get_logger("rclcpp"),
|
// message is not longer being stored.
|
||||||
"Intra process message no longer being stored when trying to handle it");
|
// TODO(ivanpauno): Print a warn message in the last two cases described above,
|
||||||
|
// but not in the first one.
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
any_callback_.dispatch_intra_process(msg, message_info);
|
any_callback_.dispatch_intra_process(msg, message_info);
|
||||||
|
@ -193,10 +194,11 @@ public:
|
||||||
intra_process_subscription_id_,
|
intra_process_subscription_id_,
|
||||||
msg);
|
msg);
|
||||||
if (!msg) {
|
if (!msg) {
|
||||||
// This either occurred because the publisher no longer exists or the
|
// This can happen when having two nodes in different process both using intraprocess
|
||||||
// message requested is no longer being stored.
|
// communication. It could happen too if the publisher no longer exists or the requested
|
||||||
RCLCPP_WARN(get_logger("rclcpp"),
|
// message is not longer being stored.
|
||||||
"Intra process message no longer being stored when trying to handle it");
|
// TODO(ivanpauno): Print a warn message in the last two cases described above,
|
||||||
|
// but not in the first one.
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
any_callback_.dispatch_intra_process(std::move(msg), message_info);
|
any_callback_.dispatch_intra_process(std::move(msg), message_info);
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue