summaryrefslogtreecommitdiffstats
path: root/source/cServer.cpp
diff options
context:
space:
mode:
authormadmaxoft@gmail.com <madmaxoft@gmail.com@0a769ca7-a7f5-676a-18bf-c427514a06d6>2012-02-28 17:59:59 +0100
committermadmaxoft@gmail.com <madmaxoft@gmail.com@0a769ca7-a7f5-676a-18bf-c427514a06d6>2012-02-28 17:59:59 +0100
commit5d0da9a2c04673eaceb630c7d38dddf4b80d2183 (patch)
treed75a180edc54274c069c0269061060408cbdd5cd /source/cServer.cpp
parentSetting the m_bDestroyed flag only after the cClienthandle is truly destroyed; cClientHandle's destructor now locks loaded chunk lists (diff)
downloadcuberite-5d0da9a2c04673eaceb630c7d38dddf4b80d2183.tar
cuberite-5d0da9a2c04673eaceb630c7d38dddf4b80d2183.tar.gz
cuberite-5d0da9a2c04673eaceb630c7d38dddf4b80d2183.tar.bz2
cuberite-5d0da9a2c04673eaceb630c7d38dddf4b80d2183.tar.lz
cuberite-5d0da9a2c04673eaceb630c7d38dddf4b80d2183.tar.xz
cuberite-5d0da9a2c04673eaceb630c7d38dddf4b80d2183.tar.zst
cuberite-5d0da9a2c04673eaceb630c7d38dddf4b80d2183.zip
Diffstat (limited to '')
-rw-r--r--source/cServer.cpp8
1 files changed, 5 insertions, 3 deletions
diff --git a/source/cServer.cpp b/source/cServer.cpp
index ab4698f3f..3b85a45c4 100644
--- a/source/cServer.cpp
+++ b/source/cServer.cpp
@@ -714,9 +714,11 @@ void cServer::cNotifyWriteThread::Execute(void)
void cServer::cNotifyWriteThread::NotifyClientWrite(const cClientHandle * a_Client)
{
- cCSLock Lock(m_CS);
- m_Clients.remove(const_cast<cClientHandle *>(a_Client)); // Put it there only once
- m_Clients.push_back(const_cast<cClientHandle *>(a_Client));
+ {
+ cCSLock Lock(m_CS);
+ m_Clients.remove(const_cast<cClientHandle *>(a_Client)); // Put it there only once
+ m_Clients.push_back(const_cast<cClientHandle *>(a_Client));
+ }
m_Event.Set();
}