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
|
@ -323,7 +323,7 @@ void JSONDB::threadMain()
|
|||
_networks_m.unlock();
|
||||
}
|
||||
|
||||
const uint64_t now = OSUtils::now();
|
||||
const int64_t now = OSUtils::now();
|
||||
try {
|
||||
Mutex::Lock _l(_networks_m);
|
||||
for(std::vector<uint64_t>::iterator ii(todo.begin());ii!=todo.end();++ii) {
|
||||
|
@ -373,7 +373,7 @@ void JSONDB::threadMain()
|
|||
} catch ( ... ) {}
|
||||
} else {
|
||||
try {
|
||||
ns.mostRecentDeauthTime = std::max(ns.mostRecentDeauthTime,OSUtils::jsonInt(member["lastDeauthorizedTime"],0ULL));
|
||||
ns.mostRecentDeauthTime = std::max(ns.mostRecentDeauthTime,(int64_t)OSUtils::jsonInt(member["lastDeauthorizedTime"],0LL));
|
||||
} catch ( ... ) {}
|
||||
}
|
||||
++ns.totalMemberCount;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue