Fixed peer exchange for more than 65000 peers

pull/9/head
Dennis Schwerdel 2016-02-04 22:40:26 +01:00
parent 5fe64853f7
commit 3cf6a28eb7
2 changed files with 4 additions and 0 deletions

View File

@ -12,6 +12,7 @@ This project follows [semantic versioning](http://semver.org).
- [changed] Updated dependencies
- [changed] New measurements
- [fixed] Fixed wrong hex address formatting
- [fixed] Fixed peer exchange for more than 65000 peers
### v0.4.3 (2016-02-02)

View File

@ -206,6 +206,9 @@ impl<P: Protocol> GenericCloud<P> {
if peer_num < 10 {
peer_num = 10;
}
if peer_num > 255 {
peer_num = 255
}
}
let peers = self.peers.subset(peer_num);
let mut msg = Message::Peers(peers);