Core/NetworkIO: Prevent queueing more async operations when socket is already closed

This commit is contained in:
Shauren
2014-08-11 20:43:07 +02:00
parent e9943914ab
commit c741d2682a
3 changed files with 29 additions and 8 deletions

View File

@@ -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();