mirror of
https://github.com/TrinityCore/TrinityCore.git
synced 2026-01-21 09:44:45 +01:00
Make sure that socket reference is removed on closing WorldSession server sided before ReactorRunnable does in the reactor event loop.
--HG-- branch : trunk
This commit is contained in:
@@ -275,10 +275,14 @@ bool WorldSession::Update(uint32 /*diff*/)
|
||||
delete packet;
|
||||
}
|
||||
|
||||
///- If necessary, kick the player from the character select screen
|
||||
if (IsConnectionIdle())
|
||||
m_Socket->CloseSocket();
|
||||
|
||||
///- Cleanup socket pointer if need
|
||||
if (m_Socket && m_Socket->IsClosed ())
|
||||
if (m_Socket && m_Socket->IsClosed())
|
||||
{
|
||||
m_Socket->RemoveReference ();
|
||||
m_Socket->RemoveReference();
|
||||
m_Socket = NULL;
|
||||
}
|
||||
|
||||
@@ -287,10 +291,6 @@ bool WorldSession::Update(uint32 /*diff*/)
|
||||
if (!m_Socket || (ShouldLogOut(currTime) && !m_playerLoading))
|
||||
LogoutPlayer(true);
|
||||
|
||||
///- If necessary, kick the player from the character select screen
|
||||
if (IsConnectionIdle())
|
||||
return false;
|
||||
|
||||
if (!m_Socket)
|
||||
return false; //Will remove this session from the world session map
|
||||
|
||||
|
||||
Reference in New Issue
Block a user