protocols/relay: Ignore IdentifyEvent::Error (#2001)

Co-authored-by: Roman Borschel <romanb@users.noreply.github.com>
This commit is contained in:
Max Inden 2021-03-16 13:22:42 +01:00 committed by GitHub
parent cd15bc9c62
commit c6a21047d7
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -1112,18 +1112,15 @@ impl NetworkBehaviourEventProcess<KademliaEvent> for CombinedBehaviour {
impl NetworkBehaviourEventProcess<IdentifyEvent> for CombinedBehaviour {
fn inject_event(&mut self, event: IdentifyEvent) {
match event {
IdentifyEvent::Received {
peer_id,
info: IdentifyInfo { listen_addrs, .. },
..
} => {
for addr in listen_addrs {
self.kad.add_address(&peer_id, addr);
}
if let IdentifyEvent::Received {
peer_id,
info: IdentifyInfo { listen_addrs, .. },
..
} = event
{
for addr in listen_addrs {
self.kad.add_address(&peer_id, addr);
}
IdentifyEvent::Sent { .. } => {}
e => panic!("{:?}", e),
}
}
}