Solved a race condition bug in the controller causing it not to exit properly.

This commit is contained in:
Thulinma 2012-09-07 12:36:09 +02:00
parent fdae70afa3
commit aee5528149

View file

@ -271,15 +271,8 @@ void CheckStats(JSON::Value & stats){
if (u_it->second.isMember("now") && u_it->second["now"].asInt() < nowtime - 3){ if (u_it->second.isMember("now") && u_it->second["now"].asInt() < nowtime - 3){
jit->second["log"].append(u_it->second); jit->second["log"].append(u_it->second);
jit->second["curr"].removeMember(u_it->first); jit->second["curr"].removeMember(u_it->first);
if (jit->second["curr"].size() < 1){ if (!jit->second["curr"].size()){break;}
break; u_it = jit->second["curr"].ObjBegin();
}else{
if (jit->second["curr"].ObjBegin() != u_it){
u_it--;
}else{
u_it = jit->second["curr"].ObjBegin();
}
}
} }
} }
} }