Merge branch 'development' into LTS_development
This commit is contained in:
commit
99b5b8361d
1 changed files with 9 additions and 0 deletions
|
@ -1,4 +1,5 @@
|
|||
#include <cstdio>
|
||||
#include <list>
|
||||
#include <mist/config.h>
|
||||
#include <mist/shared_memory.h>
|
||||
#include <mist/dtsc.h>
|
||||
|
@ -105,9 +106,17 @@ void Controller::SharedMemStats(void * config){
|
|||
statServer.parseEach(parseStatistics);
|
||||
//wipe old statistics
|
||||
if (sessions.size()){
|
||||
std::list<sessIndex> mustWipe;
|
||||
unsigned long long cutOffPoint = Util::epoch() - STAT_CUTOFF;
|
||||
for (std::map<sessIndex, statSession>::iterator it = sessions.begin(); it != sessions.end(); it++){
|
||||
it->second.wipeOld(cutOffPoint);
|
||||
if (!it->second.hasData()){
|
||||
mustWipe.push_back(it->first);
|
||||
}
|
||||
}
|
||||
while (mustWipe.size()){
|
||||
sessions.erase(mustWipe.front());
|
||||
mustWipe.pop_front();
|
||||
}
|
||||
}
|
||||
Controller::checkServerLimits(); /*LTS*/
|
||||
|
|
Loading…
Add table
Reference in a new issue