File tree Expand file tree Collapse file tree 2 files changed +9
-2
lines changed Expand file tree Collapse file tree 2 files changed +9
-2
lines changed Original file line number Diff line number Diff line change @@ -127,6 +127,13 @@ bool NodeData::create_pub_data(
127
127
const rmw_qos_profile_t * qos_profile)
128
128
{
129
129
std::lock_guard<std::mutex> lock_guard (mutex_);
130
+ if (is_shutdown_) {
131
+ RMW_ZENOH_LOG_ERROR_NAMED (
132
+ " rmw_zenoh_cpp" ,
133
+ " Unable to create PublisherData as the NodeData has been shutdown." );
134
+ return false ;
135
+ }
136
+
130
137
if (pubs_.count (publisher) > 0 ) {
131
138
RMW_ZENOH_LOG_ERROR_NAMED (
132
139
" rmw_zenoh_cpp" ,
Original file line number Diff line number Diff line change @@ -63,8 +63,8 @@ rmw_publisher_event_init(
63
63
}
64
64
65
65
rmw_event->implementation_identifier = publisher->implementation_identifier ;
66
- // TODO(Yadunund): This is still subject to race conditions. Should we
67
- // set data to context_impl which is assumed to outlast all entities?
66
+ // TODO(Yadunund): This assumes that publishers outlive their events
67
+ // which is the behavior in rcl/rclcpp.
68
68
rmw_event->data = pub_data->events_mgr ().get ();
69
69
rmw_event->event_type = event_type;
70
70
You can’t perform that action at this time.
0 commit comments