Swarm::dial adds addresses when pending (#919)

* Swarm::dial adds addresses when pending

* Bump libp2p-core to 0.3.3
This commit is contained in:
Pierre Krieger
2019-02-05 17:29:30 +01:00
committed by GitHub
parent 479924f8dc
commit 909f50f989
3 changed files with 20 additions and 5 deletions

View File

@ -1613,6 +1613,15 @@ where
self.attempt.get().next_attempts.iter()
}
/// Adds new multiaddrs to attempt if the current dialing fails.
///
/// Doesn't do anything for multiaddresses that are already in the queue.
pub fn append_multiaddr_attempts(&mut self, addrs: impl IntoIterator<Item = Multiaddr>) {
for addr in addrs {
self.append_multiaddr_attempt(addr);
}
}
/// Adds a new multiaddr to attempt if the current dialing fails.
///
/// Doesn't do anything if that multiaddress is already in the queue.