aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--src/game/WorldSession.cpp12
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