Skip to content

Commit

Permalink
Fix again
Browse files Browse the repository at this point in the history
  • Loading branch information
tomaka committed Apr 17, 2020
1 parent c10ef27 commit 80c0d3d
Showing 1 changed file with 9 additions and 3 deletions.
12 changes: 9 additions & 3 deletions swarm/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -730,9 +730,15 @@ where TBehaviour: NetworkBehaviour<ProtocolsHandler = THandler>,
} else {
log::trace!("Condition for new dialing attempt to {:?} not met: {:?}",
peer_id, condition);
if let Some(mut peer) = this.network.peer(peer_id.clone()).into_dialing() {
let addrs = this.behaviour.addresses_of_peer(peer.id());
peer.connection().add_addresses(addrs);
match this.network.peer(peer_id.clone()) {
Peer::Dialing(mut peer) => {
let addrs = this.behaviour.addresses_of_peer(peer.id());
peer.connection().add_addresses(addrs);
},
Peer::Connected(_) => {},
Peer::Disconnected(..) | Peer::Local => {
this.behaviour.inject_dial_failure(&peer_id);
}
}
};
}
Expand Down

0 comments on commit 80c0d3d

Please sign in to comment.