fixed division by zero
This commit is contained in:
parent
21e87527fd
commit
d3f0875ed5
|
@ -2461,6 +2461,8 @@ namespace aux {
|
||||||
conns.push_back(p);
|
conns.push_back(p);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if (conns.empty()) return;
|
||||||
|
|
||||||
// pick a random peer to start with, to evenly distribute
|
// pick a random peer to start with, to evenly distribute
|
||||||
// the disk bandwidth
|
// the disk bandwidth
|
||||||
std::vector<peer_connection*>::iterator peer = conns.begin() + (rand() % conns.size());
|
std::vector<peer_connection*>::iterator peer = conns.begin() + (rand() % conns.size());
|
||||||
|
|
Loading…
Reference in New Issue