diff options
| author | Adam Ierymenko <adam.ierymenko@gmail.com> | 2015-06-01 16:53:58 -0700 |
|---|---|---|
| committer | Adam Ierymenko <adam.ierymenko@gmail.com> | 2015-06-01 16:53:58 -0700 |
| commit | 5bc89034bcd2f4835e0ea48e72071c46e041a1fb (patch) | |
| tree | cd514a093069097259f785238079ebc70fc8df3c /node/Peer.cpp | |
| parent | 229195166a77c8c1b7c3e4ef6f8f4b80a524bd37 (diff) | |
| download | infinitytier-5bc89034bcd2f4835e0ea48e72071c46e041a1fb.tar.gz infinitytier-5bc89034bcd2f4835e0ea48e72071c46e041a1fb.zip | |
Always ping / contact network preferred relays (if any).
Diffstat (limited to 'node/Peer.cpp')
| -rw-r--r-- | node/Peer.cpp | 4 |
1 files changed, 3 insertions, 1 deletions
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) |
