mirror of
https://github.com/TrinityCore/TrinityCore.git
synced 2026-01-23 18:36:31 +01:00
Core/NetworkIO: Prevent queueing more async operations when socket is already closed
This commit is contained in:
@@ -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();
|
||||
|
||||
Reference in New Issue
Block a user