summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAdam Ierymenko <adam.ierymenko@gmail.com>2016-09-07 11:15:36 -0700
committerAdam Ierymenko <adam.ierymenko@gmail.com>2016-09-07 11:15:36 -0700
commitff9f8b1c2b12cf11205a040748cbc9f223a67e19 (patch)
tree78385ca7c5d81d24d034cbdc12755c64aea3fe48
parentb5c86b6ba4112b23e46170fe241b4688532b493e (diff)
downloadinfinitytier-ff9f8b1c2b12cf11205a040748cbc9f223a67e19.tar.gz
infinitytier-ff9f8b1c2b12cf11205a040748cbc9f223a67e19.zip
Typo fix.
-rw-r--r--node/Peer.cpp2
1 files changed, 1 insertions, 1 deletions
diff --git a/node/Peer.cpp b/node/Peer.cpp
index a2a91769..c24d4246 100644
--- a/node/Peer.cpp
+++ b/node/Peer.cpp
@@ -303,7 +303,7 @@ bool Peer::doPingAndKeepalive(uint64_t now,int inetAddressFamily)
}
if (bestp >= 0) {
- if ((now - _paths[best].lastReceive) >= ZT_PEER_PING_PERIOD) {
+ if ((now - _paths[bestp].lastReceive) >= ZT_PEER_PING_PERIOD) {
sendHELLO(_paths[bestp].path->localAddress(),_paths[bestp].path->address(),now);
} else if (_paths[bestp].path->needsHeartbeat(now)) {
_natKeepaliveBuf += (uint32_t)((now * 0x9e3779b1) >> 1); // tumble this around to send constantly varying (meaningless) payloads