Do not reconnect to timed out pending conections

pull/107/head
Dennis Schwerdel 2020-11-01 23:02:27 +01:00
parent bd839534e0
commit 45ab0a4608
1 changed files with 3 additions and 2 deletions

View File

@ -339,9 +339,10 @@ impl<D: Device, P: Protocol, S: Socket, TS: TimeSource> GenericCloud<D, P, S, TS
}
}
for addr in del {
self.peers.remove(&addr);
self.pending_inits.remove(&addr);
self.connect_sock(addr)?;
if self.peers.remove(&addr).is_some() {
self.connect_sock(addr)?;
}
}
Ok(())
}