git-svn-id: svn://db.shs.com.ru/pip@22 12ceb7fc-bf1f-11e4-8940-5bc7170c53b5
This commit is contained in:
@@ -425,7 +425,7 @@ bool PIPeer::mbcastRead(uchar * data, int size) {
|
||||
ra.ping = a.ping;
|
||||
ra.wait_ping = a.wait_ping;
|
||||
ra.last_ping = a.last_ping;
|
||||
piBreak;
|
||||
break;
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -528,7 +528,10 @@ void PIPeer::pingNeighbours() {
|
||||
if (!p.isNeighbour()) continue;
|
||||
piForeach (PeerInfo::Address & a, p.addresses) {
|
||||
//piCout << " address" << a.address << a.wait_ping;
|
||||
if (a.wait_ping) continue;
|
||||
if (a.wait_ping) {
|
||||
if ((PISystemTime::current(true) - a.last_ping).abs().toSeconds() <= 5.)
|
||||
continue;
|
||||
}
|
||||
a.wait_ping = true;
|
||||
sba = ba;
|
||||
sba << p.name << a.address << PISystemTime::current(true);
|
||||
|
||||
Reference in New Issue
Block a user