Fix possible missing unlock of env_lock

master
sapier 2014-02-12 19:47:27 +01:00
parent 89f7dc1efd
commit ded5f8b1a6
1 changed files with 4 additions and 3 deletions

View File

@ -4222,9 +4222,10 @@ void Server::DeleteClient(u16 peer_id, ClientDeletionReason reason)
<<" List of players: "<<os.str()<<std::endl;
}
}
m_env_mutex.Lock();
{
JMutexAutoLock env_lock(m_env_mutex);
m_clients.DeleteClient(peer_id);
m_env_mutex.Unlock();
}
}
// Send leave chat message to all remaining clients