TimerPool fixoutManipulator
git-svn-id: svn://db.shs.com.ru/pip@86 12ceb7fc-bf1f-11e4-8940-5bc7170c53b5
This commit is contained in:
@@ -112,12 +112,13 @@ void PIPeer::PeerInfo::destroy() {
|
||||
PIString PIPeer::PeerInfo::fastestAddress() const {
|
||||
double mp = -1.;
|
||||
PIString ret;
|
||||
piForeachC (Address & a, addresses)
|
||||
if (a.ping > 0.) {
|
||||
if (mp < 0) mp = a.ping;
|
||||
else mp = piMind(mp, a.ping);
|
||||
piForeachC (Address & a, addresses) {
|
||||
if (a.ping <= 0.) continue;
|
||||
if ((mp < 0) || (mp > a.ping)) {
|
||||
mp = a.ping;
|
||||
ret = a.address;
|
||||
}
|
||||
}
|
||||
return ret;
|
||||
}
|
||||
|
||||
@@ -756,6 +757,7 @@ void PIPeer::checkNetwork() {
|
||||
|
||||
|
||||
void PIPeer::initNetwork() {
|
||||
eth_send.init();
|
||||
destroyEths();
|
||||
destroyMBcasts();
|
||||
piCoutObj << "initNetwork";
|
||||
|
||||
Reference in New Issue
Block a user