File tree Expand file tree Collapse file tree 1 file changed +2
-2
lines changed Expand file tree Collapse file tree 1 file changed +2
-2
lines changed Original file line number Diff line number Diff line change @@ -273,7 +273,7 @@ class Publisher : public PublisherBase
273273 // It's not possible to do that with an unique_ptr,
274274 // as do_intra_process_publish takes the ownership of the message.
275275 bool inter_process_publish_needed =
276- get_non_local_subscription_count () > 0 ;
276+ get_subscription_count () > get_intra_process_subscription_count () ;
277277
278278 if (inter_process_publish_needed) {
279279 auto shared_msg =
@@ -351,7 +351,7 @@ class Publisher : public PublisherBase
351351 }
352352
353353 bool inter_process_publish_needed =
354- get_non_local_subscription_count () > 0 ;
354+ get_subscription_count () > get_intra_process_subscription_count () ;
355355
356356 if (inter_process_publish_needed) {
357357 auto ros_msg_ptr = std::make_shared<ROSMessageType>();
You can’t perform that action at this time.
0 commit comments