File tree Expand file tree Collapse file tree 1 file changed +4
-11
lines changed
protocols/request-response/src Expand file tree Collapse file tree 1 file changed +4
-11
lines changed Original file line number Diff line number Diff line change @@ -708,18 +708,11 @@ where
708
708
}
709
709
}
710
710
711
- fn on_dial_failure (
712
- & mut self ,
713
- DialFailure {
714
- peer_id,
715
- connection_id,
716
- ..
717
- } : DialFailure ,
718
- ) {
719
- let key = if let Some ( peer_id) = peer_id {
711
+ fn on_dial_failure ( & mut self , failure : DialFailure ) {
712
+ let key = if let Some ( peer_id) = failure. peer_id {
720
713
peer_id. into ( )
721
714
} else {
722
- connection_id. into ( )
715
+ failure . connection_id . into ( )
723
716
} ;
724
717
725
718
// If there are pending outgoing requests when a dial failure occurs,
@@ -732,7 +725,7 @@ where
732
725
for request in pending {
733
726
self . pending_events
734
727
. push_back ( ToSwarm :: GenerateEvent ( Event :: OutboundFailure {
735
- peer : peer_id,
728
+ peer : failure . peer_id ,
736
729
request_id : request. request_id ,
737
730
error : OutboundFailure :: DialFailure ,
738
731
} ) ) ;
You can’t perform that action at this time.
0 commit comments