mirror of
https://github.com/fluencelabs/rust-libp2p
synced 2025-06-21 05:41:33 +00:00
swarm/src/behaviour: Merge inject_* paired methods (#2445)
Co-authored-by: Max Inden <mail@max-inden.de>
This commit is contained in:
@ -127,8 +127,17 @@ impl NetworkBehaviour for Mdns {
|
||||
}
|
||||
}
|
||||
|
||||
fn inject_disconnected(&mut self, peer: &PeerId) {
|
||||
self.expire_node(peer);
|
||||
fn inject_connection_closed(
|
||||
&mut self,
|
||||
peer: &PeerId,
|
||||
_: &libp2p_core::connection::ConnectionId,
|
||||
_: &libp2p_core::ConnectedPoint,
|
||||
_: Self::ProtocolsHandler,
|
||||
remaining_established: usize,
|
||||
) {
|
||||
if remaining_established == 0 {
|
||||
self.expire_node(peer);
|
||||
}
|
||||
}
|
||||
|
||||
fn poll(
|
||||
|
Reference in New Issue
Block a user