diff options
| author | Machiavelli <none@none> | 2010-05-05 22:56:02 +0200 |
|---|---|---|
| committer | Machiavelli <none@none> | 2010-05-05 22:56:02 +0200 |
| commit | 6ad4d4c8d2804e404cb4babcbf74788e6d727430 (patch) | |
| tree | 580115a69b635bc7f0393871dc0d6bead45432f9 /src | |
| parent | d6f7547ebab5adea33cf1981ee76d463226bb441 (diff) | |
Make sure that socket reference is removed on closing WorldSession server sided before ReactorRunnable does in the reactor event loop.
--HG--
branch : trunk
Diffstat (limited to 'src')
| -rw-r--r-- | src/game/WorldSession.cpp | 12 |
1 files changed, 6 insertions, 6 deletions
diff --git a/src/game/WorldSession.cpp b/src/game/WorldSession.cpp index 3724d58b63d..f76140fe085 100644 --- a/src/game/WorldSession.cpp +++ b/src/game/WorldSession.cpp @@ -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 |
