diff options
| author | Adam Ierymenko <adam.ierymenko@gmail.com> | 2016-08-24 17:56:35 -0700 |
|---|---|---|
| committer | Adam Ierymenko <adam.ierymenko@gmail.com> | 2016-08-24 17:56:35 -0700 |
| commit | 584228b2b5ff91a3db4699174bbefe1540d4ce59 (patch) | |
| tree | 36c03f06461ed308cbe26681308c8279a15f13ac /node/Peer.cpp | |
| parent | cd3683f2bae5e706b5afdf40eee2b5f486f5aedb (diff) | |
| download | infinitytier-584228b2b5ff91a3db4699174bbefe1540d4ce59.tar.gz infinitytier-584228b2b5ff91a3db4699174bbefe1540d4ce59.zip | |
Dead code removal, and get rid of reliable() because we will no longer make that distinction.
Diffstat (limited to 'node/Peer.cpp')
| -rw-r--r-- | node/Peer.cpp | 4 |
1 files changed, 1 insertions, 3 deletions
diff --git a/node/Peer.cpp b/node/Peer.cpp index 7691408e..01492be1 100644 --- a/node/Peer.cpp +++ b/node/Peer.cpp @@ -230,13 +230,11 @@ bool Peer::doPingAndKeepalive(uint64_t now,int inetAddressFamily) sendHELLO(p->localAddress(),p->address(),now); p->sent(now); p->pinged(now); - } else if ( ((now - std::max(p->lastSend(),p->lastKeepalive())) >= ZT_NAT_KEEPALIVE_DELAY) && (!p->reliable()) ) { + } else if ((now - std::max(p->lastSend(),p->lastKeepalive())) >= ZT_NAT_KEEPALIVE_DELAY) { //TRACE("NAT keepalive %s(%s) after %llums/%llums send/receive inactivity",_id.address().toString().c_str(),p->address().toString().c_str(),now - p->lastSend(),now - p->lastReceived()); _natKeepaliveBuf += (uint32_t)((now * 0x9e3779b1) >> 1); // tumble this around to send constantly varying (meaningless) payloads RR->node->putPacket(p->localAddress(),p->address(),&_natKeepaliveBuf,sizeof(_natKeepaliveBuf)); p->sentKeepalive(now); - } else { - //TRACE("no PING or NAT keepalive: addr==%s reliable==%d %llums/%llums send/receive inactivity",p->address().toString().c_str(),(int)p->reliable(),now - p->lastSend(),now - p->lastReceived()); } return true; } |
