aboutsummaryrefslogtreecommitdiff
path: root/src/game/WorldSocket.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/game/WorldSocket.cpp')
-rw-r--r--src/game/WorldSocket.cpp18
1 files changed, 4 insertions, 14 deletions
diff --git a/src/game/WorldSocket.cpp b/src/game/WorldSocket.cpp
index 559c1d88514..c07b369d0b9 100644
--- a/src/game/WorldSocket.cpp
+++ b/src/game/WorldSocket.cpp
@@ -729,20 +729,10 @@ int WorldSocket::ProcessIncoming (WorldPacket* new_pct)
if (m_Session != NULL)
{
- /* The m_TimeOutTime measure is put in to be able to automatically disconnect connections
- that are sitting idle on the character select screen. After a period of being AFK in the realm,
- the client will be automatically sent back to the character selection screen. In order to pick up
- the idle connections and prevent they are sitting there, taking up slots for the realm, we'll check if the packet
- that was sent is CMSG_CHAR_ENUM and initiate the timeout timer that will be checked on WorldSession::Update.
- */
- if (opcode == CMSG_CHAR_ENUM)
- m_Session->UpdateTimeOutTime(true);
- /* If we're sending any other opcode, it means our connection is not idle, we're logging into the world.
- Until we receive our next CMSG_CHAR_ENUM packet, we can disregard the timeout timer.
- */
- else
- m_Session->UpdateTimeOutTime(false);
-
+ // Our Idle timer will reset on any non PING opcodes.
+ // Catches people idling on the login screen and any lingering ingame connections.
+ m_Session->ResetTimeOutTime();
+
// OK ,give the packet to WorldSession
aptr.release();
// WARNINIG here we call it with locks held.