dumb way to keep voxel server alive for testing

This commit is contained in:
Stephen Birarda 2013-03-20 16:22:38 -07:00
parent abc0deaa78
commit f4e9594f72

View file

@ -233,7 +233,7 @@ void *removeSilentAgents(void *args) {
checkTimeUSecs = usecTimestampNow();
for(std::vector<Agent>::iterator agent = agents->begin(); agent != agents->end();) {
if ((checkTimeUSecs - agent->getLastRecvTimeUsecs()) > AGENT_SILENCE_THRESHOLD_USECS) {
if ((checkTimeUSecs - agent->getLastRecvTimeUsecs()) > AGENT_SILENCE_THRESHOLD_USECS && agent->getType() != 'V') {
std::cout << "Killing agent " << &(*agent) << "\n";
pthread_mutex_lock(&vectorChangeMutex);
agent = agents->erase(agent);