mirror of
https://github.com/fluencelabs/rust-libp2p
synced 2025-06-03 05:01:24 +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 {
|
impl NetworkBehaviourEventProcess<IdentifyEvent> for CombinedBehaviour {
|
||||||
fn inject_event(&mut self, event: IdentifyEvent) {
|
fn inject_event(&mut self, event: IdentifyEvent) {
|
||||||
match event {
|
if let IdentifyEvent::Received {
|
||||||
IdentifyEvent::Received {
|
peer_id,
|
||||||
peer_id,
|
info: IdentifyInfo { listen_addrs, .. },
|
||||||
info: IdentifyInfo { listen_addrs, .. },
|
..
|
||||||
..
|
} = event
|
||||||
} => {
|
{
|
||||||
for addr in listen_addrs {
|
for addr in listen_addrs {
|
||||||
self.kad.add_address(&peer_id, addr);
|
self.kad.add_address(&peer_id, addr);
|
||||||
}
|
|
||||||
}
|
}
|
||||||
IdentifyEvent::Sent { .. } => {}
|
|
||||||
e => panic!("{:?}", e),
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user