mirror of
https://github.com/mangosfour/server.git
synced 2025-12-15 19:37:02 +00:00
[8463] Fixed race conditions in LockedQueue.
Signed-off-by: ApoC <apoc@nymfe.net>
This commit is contained in:
parent
7f444189c6
commit
66ffd80ed2
6 changed files with 42 additions and 86 deletions
|
|
@ -69,11 +69,9 @@ WorldSession::~WorldSession()
|
|||
}
|
||||
|
||||
///- empty incoming packet queue
|
||||
while(!_recvQueue.empty())
|
||||
{
|
||||
WorldPacket *packet = _recvQueue.next ();
|
||||
WorldPacket* packet;
|
||||
while(_recvQueue.next(packet))
|
||||
delete packet;
|
||||
}
|
||||
}
|
||||
|
||||
void WorldSession::SizeError(WorldPacket const& packet, uint32 size) const
|
||||
|
|
@ -163,10 +161,9 @@ bool WorldSession::Update(uint32 /*diff*/)
|
|||
{
|
||||
///- Retrieve packets from the receive queue and call the appropriate handlers
|
||||
/// not proccess packets if socket already closed
|
||||
while (!_recvQueue.empty() && m_Socket && !m_Socket->IsClosed ())
|
||||
WorldPacket* packet;
|
||||
while (_recvQueue.next(packet) && m_Socket && !m_Socket->IsClosed ())
|
||||
{
|
||||
WorldPacket *packet = _recvQueue.next();
|
||||
|
||||
/*#if 1
|
||||
sLog.outError( "MOEP: %s (0x%.4X)",
|
||||
LookupOpcodeName(packet->GetOpcode()),
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue