diff options
Diffstat (limited to 'node/Peer.cpp')
| -rw-r--r-- | node/Peer.cpp | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/node/Peer.cpp b/node/Peer.cpp index 54e30a74..e61631e2 100644 --- a/node/Peer.cpp +++ b/node/Peer.cpp @@ -35,6 +35,7 @@ namespace ZeroTier { Peer::Peer() : _lastUsed(0), + _lastReceive(0), _lastUnicastFrame(0), _lastMulticastFrame(0), _lastAnnouncedTo(0), @@ -47,6 +48,7 @@ Peer::Peer(const Identity &myIdentity,const Identity &peerIdentity) throw(std::runtime_error) : _id(peerIdentity), _lastUsed(0), + _lastReceive(0), _lastUnicastFrame(0), _lastMulticastFrame(0), _lastAnnouncedTo(0), @@ -73,6 +75,9 @@ void Peer::receive( // Update system-wide last packet receive time *((const_cast<uint64_t *>(&(_r->timeOfLastPacketReceived)))) = now; + // Global last receive time regardless of path + _lastReceive = now; + // Learn paths from direct packets (hops == 0) if (!hops) { { |
