Missing logic in preferred peers (#1471)

This commit is contained in:
Quentin Le Sceller 2018-09-03 16:27:40 +02:00 committed by GitHub
parent 0cbfeaab94
commit 45fffd8534
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -174,9 +174,11 @@ fn monitor_peers(
Some(preferred_peers) => {
for mut p in preferred_peers {
if !connected_peers.is_empty() {
if connected_peers.contains(&p) {
if !connected_peers.contains(&p) {
tx.send(p).unwrap();
}
} else {
tx.send(p).unwrap();
}
}
}