diff options
author | Machiavelli <none@none> | 2010-05-16 03:42:05 +0200 |
---|---|---|
committer | Machiavelli <none@none> | 2010-05-16 03:42:05 +0200 |
commit | 6ee54548f34ab2247612f2d24e7412ce798dd3af (patch) | |
tree | 9bc0418417590e3741620e1102ccaab8967847b7 /src/game/WorldSocket.cpp | |
parent | a99c6bd5a9c26126b59979fb21abb1c847a6edf8 (diff) |
Fix Autokick timer. Will work again properly for people on the char selection screen. In addition, it now also catches non-terminated, lingering sessions.
--HG--
branch : trunk
Diffstat (limited to 'src/game/WorldSocket.cpp')
-rw-r--r-- | src/game/WorldSocket.cpp | 18 |
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. |