mirror of https://github.com/dswd/vpncloud.git
Fixed peer exchange for more than 65000 peers
This commit is contained in:
parent
5fe64853f7
commit
3cf6a28eb7
|
@ -12,6 +12,7 @@ This project follows [semantic versioning](http://semver.org).
|
||||||
- [changed] Updated dependencies
|
- [changed] Updated dependencies
|
||||||
- [changed] New measurements
|
- [changed] New measurements
|
||||||
- [fixed] Fixed wrong hex address formatting
|
- [fixed] Fixed wrong hex address formatting
|
||||||
|
- [fixed] Fixed peer exchange for more than 65000 peers
|
||||||
|
|
||||||
### v0.4.3 (2016-02-02)
|
### v0.4.3 (2016-02-02)
|
||||||
|
|
||||||
|
|
|
@ -206,6 +206,9 @@ impl<P: Protocol> GenericCloud<P> {
|
||||||
if peer_num < 10 {
|
if peer_num < 10 {
|
||||||
peer_num = 10;
|
peer_num = 10;
|
||||||
}
|
}
|
||||||
|
if peer_num > 255 {
|
||||||
|
peer_num = 255
|
||||||
|
}
|
||||||
}
|
}
|
||||||
let peers = self.peers.subset(peer_num);
|
let peers = self.peers.subset(peer_num);
|
||||||
let mut msg = Message::Peers(peers);
|
let mut msg = Message::Peers(peers);
|
||||||
|
|
Loading…
Reference in New Issue