mirror of
https://github.com/TrinityCore/TrinityCore.git
synced 2026-01-18 16:38:42 +01:00
Merge pull request #10696 from jackpoz/socket_race_condition
Core/Socket: Fix race condition in WorldSocket
This commit is contained in:
@@ -445,9 +445,15 @@ int WorldSocket::Update (void)
|
||||
if (closing_)
|
||||
return -1;
|
||||
|
||||
if (m_OutActive || (m_OutBuffer->length() == 0 && msg_queue()->is_empty()))
|
||||
if (m_OutActive)
|
||||
return 0;
|
||||
|
||||
{
|
||||
ACE_GUARD_RETURN (LockType, Guard, m_OutBufferLock, 0);
|
||||
if (m_OutBuffer->length() == 0 && msg_queue()->is_empty())
|
||||
return 0;
|
||||
}
|
||||
|
||||
int ret;
|
||||
do
|
||||
ret = handle_output(get_handle());
|
||||
|
||||
Reference in New Issue
Block a user