aboutsummaryrefslogtreecommitdiff
path: root/src/server/authserver/Server/AuthSession.cpp
diff options
context:
space:
mode:
authorShauren <shauren.trinity@gmail.com>2014-08-11 20:43:07 +0200
committerShauren <shauren.trinity@gmail.com>2014-08-11 20:43:07 +0200
commitc741d2682a1835b0e9a775d1aba9f795db348450 (patch)
treebe988d054384733bd2a08e24352055fa23a31a60 /src/server/authserver/Server/AuthSession.cpp
parente9943914ab726c563d6d98fbd4d123b2c1b95e60 (diff)
Core/NetworkIO: Prevent queueing more async operations when socket is already closed
Diffstat (limited to 'src/server/authserver/Server/AuthSession.cpp')
-rw-r--r--src/server/authserver/Server/AuthSession.cpp3
1 files changed, 3 insertions, 0 deletions
diff --git a/src/server/authserver/Server/AuthSession.cpp b/src/server/authserver/Server/AuthSession.cpp
index 76f8b8c27b0..9931595e860 100644
--- a/src/server/authserver/Server/AuthSession.cpp
+++ b/src/server/authserver/Server/AuthSession.cpp
@@ -169,6 +169,9 @@ void AuthSession::ReadDataHandler()
void AuthSession::AsyncWrite(ByteBuffer& packet)
{
+ if (!IsOpen())
+ return;
+
std::lock_guard<std::mutex> guard(_writeLock);
bool needsWriteStart = _writeQueue.empty();