projects
/
oweals
/
minetest.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
89f7dc1
)
Fix possible missing unlock of env_lock
author
sapier
<Sapier at GMX dot net>
Wed, 12 Feb 2014 18:47:27 +0000
(19:47 +0100)
committer
sapier
<Sapier at GMX dot net>
Wed, 12 Feb 2014 18:47:27 +0000
(19:47 +0100)
src/server.cpp
patch
|
blob
|
history
diff --git
a/src/server.cpp
b/src/server.cpp
index 66f3cc1a74d058600e4a5af05f4960b427ef2c9d..81622d6259d645c97db353ebc3f8223155cdd8c2 100644
(file)
--- a/
src/server.cpp
+++ b/
src/server.cpp
@@
-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