You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
// Return handle to existing Publication if it exists
698
698
let existing_entry = {
699
699
self.publishers.iter().find_map(|(key, value)| {
700
-
if key.as_str() == &topic {
701
-
if value.topic_type() == topic_type {
702
-
ifletSome(sender) = value.get_sender(){
703
-
returnSome(Ok(sender));
704
-
}else{
705
-
// Edge case here
706
-
// The channel for the publication is closed, but publication hasn't been cleaned up yet
707
-
None
708
-
}
709
-
}else{
710
-
warn!("Attempted to register publisher with different topic type than existing publisher: existing_type={}, new_type={}", value.topic_type(), topic_type);
700
+
if key.as_str() != &topic {
701
+
returnNone;
702
+
}
703
+
if value.topic_type() != topic_type {
704
+
warn!("Attempted to register publisher with different topic type than existing publisher: existing_type={}, new_type={}", value.topic_type(), topic_type);
705
+
// TODO MAJOR: this is a terrible error type to return...
0 commit comments