Fix legacy substream fallback not working (#6826)

* Fix legacy substream fallback not working

* Make it nicer
This commit is contained in:
Pierre Krieger
2020-08-05 18:20:09 +02:00
committed by GitHub
parent 4a94fe860d
commit ee35dc9415
@@ -600,15 +600,10 @@ impl ProtocolsHandler for NotifsHandler {
message
} => {
for (handler, _) in &mut self.out_handlers {
if handler.protocol_name() != &protocol_name[..] {
continue;
}
if handler.is_open() {
if handler.protocol_name() == &protocol_name[..] && handler.is_open() {
handler.send_or_discard(message);
continue 'poll_notifs_sink;
}
continue 'poll_notifs_sink;
}
self.legacy.inject_event(LegacyProtoHandlerIn::SendCustomMessage {