summaryrefslogtreecommitdiff
path: root/node/Topology.hpp
diff options
context:
space:
mode:
authorGrant Limberg <grant.limberg@zerotier.com>2017-10-02 15:52:57 -0700
committerGrant Limberg <grant.limberg@zerotier.com>2017-10-02 15:52:57 -0700
commitb1d60df44cb24589bc5718da932ef4bb54168fa3 (patch)
treec240b5b626f534f4a3673bedbdf6d80b59a8d475 /node/Topology.hpp
parent7cf70d111ac3bfc1bf6aa7e3ec8d9c83e35f48a1 (diff)
downloadinfinitytier-b1d60df44cb24589bc5718da932ef4bb54168fa3.tar.gz
infinitytier-b1d60df44cb24589bc5718da932ef4bb54168fa3.zip
timestamps changed from uint64_t to int64_t
There were cases in the code where time calculations and comparisons were overflowing and causing connection instability. This will keep time calculations within expected ranges.
Diffstat (limited to 'node/Topology.hpp')
-rw-r--r--node/Topology.hpp4
1 files changed, 2 insertions, 2 deletions
diff --git a/node/Topology.hpp b/node/Topology.hpp
index 34df28a1..c3a218e3 100644
--- a/node/Topology.hpp
+++ b/node/Topology.hpp
@@ -286,13 +286,13 @@ public:
/**
* Clean and flush database
*/
- void doPeriodicTasks(void *tPtr,uint64_t now);
+ void doPeriodicTasks(void *tPtr,int64_t now);
/**
* @param now Current time
* @return Number of peers with active direct paths
*/
- inline unsigned long countActive(uint64_t now) const
+ inline unsigned long countActive(int64_t now) const
{
unsigned long cnt = 0;
Mutex::Lock _l(_peers_m);