From 5bc89034bcd2f4835e0ea48e72071c46e041a1fb Mon Sep 17 00:00:00 2001 From: Adam Ierymenko Date: Mon, 1 Jun 2015 16:53:58 -0700 Subject: Always ping / contact network preferred relays (if any). --- node/Peer.cpp | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) (limited to 'node/Peer.cpp') diff --git a/node/Peer.cpp b/node/Peer.cpp index d788d006..f5365223 100644 --- a/node/Peer.cpp +++ b/node/Peer.cpp @@ -191,7 +191,7 @@ void Peer::attemptToContactAt(const RuntimeEnvironment *RR,const InetAddress &at RR->node->putPacket(atAddress,outp.data(),outp.size()); } -void Peer::doPingAndKeepalive(const RuntimeEnvironment *RR,uint64_t now) +bool Peer::doPingAndKeepalive(const RuntimeEnvironment *RR,uint64_t now) { Path *const bestPath = getBestPath(now); if ((bestPath)&&(bestPath->active(now))) { @@ -204,7 +204,9 @@ void Peer::doPingAndKeepalive(const RuntimeEnvironment *RR,uint64_t now) RR->node->putPacket(bestPath->address(),"",0); bestPath->sent(now); } + return true; } + return false; } void Peer::addPath(const Path &newp) -- cgit v1.2.3