mirror of
https://github.com/minetest/minetest.git
synced 2025-04-02 08:22:56 +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.
|
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
|
// Don't send too many at a time
|
||||||
//u32 count = 0;
|
//u32 count = 0;
|
||||||
|
|
||||||
|
Reference in New Issue
Block a user