summaryrefslogtreecommitdiffstats
path: root/source/cClientHandle.cpp
diff options
context:
space:
mode:
authormadmaxoft@gmail.com <madmaxoft@gmail.com@0a769ca7-a7f5-676a-18bf-c427514a06d6>2012-09-04 21:05:35 +0200
committermadmaxoft@gmail.com <madmaxoft@gmail.com@0a769ca7-a7f5-676a-18bf-c427514a06d6>2012-09-04 21:05:35 +0200
commite3d5da24091bad6043d7eef00f8f297bf1203ab5 (patch)
tree409ee30de2e9df0c46f0d4043149d01616a520e1 /source/cClientHandle.cpp
parentFixed preprocessor definitions in Linux (diff)
downloadcuberite-e3d5da24091bad6043d7eef00f8f297bf1203ab5.tar
cuberite-e3d5da24091bad6043d7eef00f8f297bf1203ab5.tar.gz
cuberite-e3d5da24091bad6043d7eef00f8f297bf1203ab5.tar.bz2
cuberite-e3d5da24091bad6043d7eef00f8f297bf1203ab5.tar.lz
cuberite-e3d5da24091bad6043d7eef00f8f297bf1203ab5.tar.xz
cuberite-e3d5da24091bad6043d7eef00f8f297bf1203ab5.tar.zst
cuberite-e3d5da24091bad6043d7eef00f8f297bf1203ab5.zip
Diffstat (limited to 'source/cClientHandle.cpp')
-rw-r--r--source/cClientHandle.cpp7
1 files changed, 5 insertions, 2 deletions
diff --git a/source/cClientHandle.cpp b/source/cClientHandle.cpp
index f4f5125c2..06325785e 100644
--- a/source/cClientHandle.cpp
+++ b/source/cClientHandle.cpp
@@ -1546,8 +1546,11 @@ void cClientHandle::DataReceived(const char * a_Data, int a_Size)
void cClientHandle::GetOutgoingData(AString & a_Data)
{
// Data can be sent to client
- m_OutgoingData.ReadAll(a_Data);
- m_OutgoingData.CommitRead();
+ {
+ cCSLock Lock(m_CSOutgoingData);
+ m_OutgoingData.ReadAll(a_Data);
+ m_OutgoingData.CommitRead();
+ }
// Disconnect player after all packets have been sent
if (m_bKicking && a_Data.empty())