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.
This commit is contained in:
parent
7cf70d111a
commit
b1d60df44c
34 changed files with 209 additions and 201 deletions
|
@ -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);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue