From e97656c10232ca6c167dc6aa98290ddee4b63236 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=D0=9F=D0=B5=D0=BB=D0=B8=D0=BF=D0=B5=D0=BD=D0=BA=D0=BE=20?= =?UTF-8?q?=D0=98=D0=B2=D0=B0=D0=BD?= Date: Thu, 12 Mar 2015 14:18:27 +0000 Subject: [PATCH] git-svn-id: svn://db.shs.com.ru/pip@22 12ceb7fc-bf1f-11e4-8940-5bc7170c53b5 --- src/io/pipeer.cpp | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) 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);