Removing learnt addresses of lost peers

This commit is contained in:
Dennis Schwerdel 2016-06-29 08:47:36 +02:00
parent a698ad95a3
commit 1cf1d0687b
2 changed files with 6 additions and 1 deletions

View File

@ -4,12 +4,15 @@ This project follows [semantic versioning](http://semver.org).
### UNRELEASED
- [added] Added documentation
- [changed] Code cleanup
- [changed] Updated dependencies
- [changed] Turned some clippy warnings off
- [changed] Cross-compiling for ARM
- [removed] Removed Address remove code for prefix table
- [fixed] Reconnecting to lost peers when receiving from them or sending to them
- [fixed] Sending peer list more often to prevent timeouts
- [fixed] Removing learnt addresses of lost peers
### v0.6.0 (2016-06-02)

View File

@ -351,7 +351,9 @@ impl<P: Protocol> GenericCloud<P> {
/// # Errors
/// This method returns errors if sending a message fails or resolving an address fails.
fn housekeep(&mut self) -> Result<(), Error> {
self.peers.timeout();
for peer in self.peers.timeout() {
self.table.remove_all(&peer);
}
self.table.housekeep();
// Periodically send peer list to peers
let now = now();