summaryrefslogtreecommitdiffstats
path: root/source/cClientHandle.cpp
diff options
context:
space:
mode:
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())