diff options
| author | Grant Limberg <grant.limberg@zerotier.com> | 2016-11-16 16:23:56 -0800 |
|---|---|---|
| committer | Grant Limberg <grant.limberg@zerotier.com> | 2016-11-16 16:23:56 -0800 |
| commit | b4bacd50a1ae70d53d16aef6880aa1fc6870bd8c (patch) | |
| tree | 21fd07022eff4a5debd4cc37da02f22660348237 /node/Peer.hpp | |
| parent | 6445337a32f5470e84bb9b139c25697e22d492f6 (diff) | |
| parent | 3c248ec61a732f539dcf0c9ea3d92ae8f42b62fe (diff) | |
| download | infinitytier-b4bacd50a1ae70d53d16aef6880aa1fc6870bd8c.tar.gz infinitytier-b4bacd50a1ae70d53d16aef6880aa1fc6870bd8c.zip | |
Merge branch 'dev' into systemtray
Diffstat (limited to 'node/Peer.hpp')
| -rw-r--r-- | node/Peer.hpp | 20 |
1 files changed, 2 insertions, 18 deletions
diff --git a/node/Peer.hpp b/node/Peer.hpp index d0589ccf..be05aa3a 100644 --- a/node/Peer.hpp +++ b/node/Peer.hpp @@ -227,24 +227,9 @@ public: inline bool isAlive(const uint64_t now) const { return ((now - _lastReceive) < ZT_PEER_ACTIVITY_TIMEOUT); } /** - * @return Time of most recent unicast frame received - */ - inline uint64_t lastUnicastFrame() const { return _lastUnicastFrame; } - - /** - * @return Time of most recent multicast frame received - */ - inline uint64_t lastMulticastFrame() const { return _lastMulticastFrame; } - - /** - * @return Time of most recent frame of any kind (unicast or multicast) - */ - inline uint64_t lastFrame() const { return std::max(_lastUnicastFrame,_lastMulticastFrame); } - - /** * @return True if this peer has sent us real network traffic recently */ - inline uint64_t isActive(uint64_t now) const { return ((now - lastFrame()) < ZT_PEER_ACTIVITY_TIMEOUT); } + inline uint64_t isActive(uint64_t now) const { return ((now - _lastNontrivialReceive) < ZT_PEER_ACTIVITY_TIMEOUT); } /** * @return Latency in milliseconds or 0 if unknown @@ -469,8 +454,7 @@ private: uint8_t _key[ZT_PEER_SECRET_KEY_LENGTH]; uint8_t _remoteClusterOptimal6[16]; uint64_t _lastReceive; // direct or indirect - uint64_t _lastUnicastFrame; - uint64_t _lastMulticastFrame; + uint64_t _lastNontrivialReceive; // frames, things like netconf, etc. uint64_t _lastDirectPathPushSent; uint64_t _lastDirectPathPushReceive; uint64_t _lastCredentialRequestSent; |
