mirror of
https://github.com/fluencelabs/rust-libp2p
synced 2025-06-01 12:11:20 +00:00
protocols/relay: Ignore IdentifyEvent::Error (#2001)
Co-authored-by: Roman Borschel <romanb@users.noreply.github.com>
This commit is contained in:
parent
cd15bc9c62
commit
c6a21047d7
@ -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),
|
||||
}
|
||||
}
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user