/// The method removes the given peer from the list of current peers.
The method removes the given peer from the list of current peers.
The method removes the given peer from the list of current peers .
fn remove_peer(&self, node_id: NodeId, registry_version: RegistryVersion) {
        let mut current_peers = self.current_peers.lock().unwrap();
        if let Err(e) =
            self.transport
                .stop_connections(self.transport_client_type, &node_id, registry_version)
        {
            warn!(self.log, "stop connection failed {:?}: {:?}", node_id, e);
        }
        // Remove the peer irrespective of the result of the stop_connections() call.
        current_peers.remove(&node_id);
    }
fn remove_peer ( & self , node_id : NodeId , registry_version : RegistryVersion ) { let mut current_peers = self . current_peers . lock ( ) . unwrap ( ) ; if let Err ( e ) = self . transport . stop_connections ( self . transport_client_type , & node_id , registry_version ) { warn ! ( self log " " node_id e ) ; } // Remove the peer irrespective of the result of the stop_connections() call. current_peers . remove ( & node_id ) ; }
The method removes the given peer from the list of current peers.
The method removes the given peer from the list of current peers .
&self
node_id
NodeId
registry_version
RegistryVersion