diff --git a/src/io/pipeer.cpp b/src/io/pipeer.cpp index 637dc72c..ee2f21d7 100755 --- a/src/io/pipeer.cpp +++ b/src/io/pipeer.cpp @@ -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);