mirror of
https://github.com/luanti-org/luanti.git
synced 2025-06-27 16:36:03 +00:00
Correctly lock mutexes when the server sends MapEditEvents (could cause memory corruption)
This commit is contained in:
parent
07e5c9bd5f
commit
14a8fa4d68
1 changed files with 4 additions and 0 deletions
|
@ -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;
|
||||||
|
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue