From b9f60ac92c049428b0aec6d1260cc5dddff87dd6 Mon Sep 17 00:00:00 2001 From: Thulinma Date: Tue, 18 Apr 2017 12:12:51 +0200 Subject: [PATCH] Sessions are now wiped after the disconnect timeout, if denied access --- src/controller/controller_statistics.cpp | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/src/controller/controller_statistics.cpp b/src/controller/controller_statistics.cpp index 6fabe609..e464335d 100644 --- a/src/controller/controller_statistics.cpp +++ b/src/controller/controller_statistics.cpp @@ -253,8 +253,12 @@ void Controller::SharedMemStats(void * config){ unsigned long long cutOffPoint = Util::epoch() - STAT_CUTOFF; unsigned long long disconnectPoint = Util::epoch() - STATS_DELAY; for (std::map::iterator it = sessions.begin(); it != sessions.end(); it++){ - it->second.wipeOld(cutOffPoint); it->second.ping(it->first, disconnectPoint); + if (it->second.sync == 100){ + it->second.wipeOld(disconnectPoint); + }else{ + it->second.wipeOld(cutOffPoint); + } if (!it->second.hasData()){ mustWipe.push_back(it->first); }else{