Skip to content
Permalink
Browse files
Fix possible missing unlock of env_lock
  • Loading branch information
sapier authored and sapier committed Feb 12, 2014
1 parent 89f7dc1 commit ded5f8b1a67fbfb3bb0023b9c6d0fc305469ade4
Showing 1 changed file with 4 additions and 3 deletions.
@@ -4222,9 +4222,10 @@ void Server::DeleteClient(u16 peer_id, ClientDeletionReason reason)
<<" List of players: "<<os.str()<<std::endl;
}
}
m_env_mutex.Lock();
m_clients.DeleteClient(peer_id);
m_env_mutex.Unlock();
{
JMutexAutoLock env_lock(m_env_mutex);
m_clients.DeleteClient(peer_id);
}
}

// Send leave chat message to all remaining clients

0 comments on commit ded5f8b

Please sign in to comment.