mirror of
https://github.com/luanti-org/luanti.git
synced 2025-10-13 00:25:19 +02:00
Correctly lock mutexes when the server sends MapEditEvents (could cause memory corruption)
This commit is contained in:
@@ -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;
|
||||
|
||||
|
Reference in New Issue
Block a user