// Handle a failed connection attempt to a currently not connected peer.
// Emit failures for outbound requests that are awaiting the connection.
Handle a failed connection attempt to a currently not connected peer.
Emit failures for outbound requests that are awaiting the connection.
Handle a failed connection attempt to a currently not connected peer . Emit failures for outbound requests that are awaiting the connection .
pub fn on_dial_failure(&mut self, peer: PeerId) {
        if let Some(requests) = self.awaiting_connection.remove(&peer) {
            requests.into_iter().for_each(|request_id| {
                unwrap_or_return!(self.outbound_request_store.remove(&request_id));
                let action = BehaviourAction::OutboundFailure {
                    request_id,
                    peer,
                    failure: OutboundFailure::DialFailure,
                };
                self.actions.push_back(action);
            });
        }
    }
pub fn on_dial_failure ( & mut self , peer : PeerId ) { if let Some ( requests ) = self . awaiting_connection . remove ( & peer ) { requests . into_iter ( ) . for_each ( | request_id | { unwrap_or_return ! ( self outbound_request_store remove ( request_id ) ) ; let action = BehaviourAction :: OutboundFailure { request_id , peer , failure : OutboundFailure :: DialFailure , } ; self . actions . push_back ( action ) ; } ) ; } }
Handle a failed connection attempt to a currently not connected peer.
Handle a failed connection attempt to a currently not connected peer .
&mut self
peer
PeerId