Correctly lock mutexes when the server sends MapEditEvents (could cause memory corruption)

This commit is contained in:
Perttu Ahola 2012-03-28 12:51:47 +03:00
parent 07e5c9bd5f
commit 14a8fa4d68

@ -1689,6 +1689,10 @@ void Server::AsyncRunStep()
Send queued-for-sending map edit events.
*/
{
// We will be accessing the environment and the connection
JMutexAutoLock lock(m_env_mutex);
JMutexAutoLock conlock(m_con_mutex);
// Don't send too many at a time
//u32 count = 0;