mirror of
https://github.com/mod-playerbots/azerothcore-wotlk.git
synced 2026-01-22 21:26:23 +00:00
Core/Session: proper client timeout detection (#1232)
* Core/Session: proper client timeout detection - Properly detect client timeout when logged into a character after a configurable time (default 60s) has passed without the client sending any packets. - Fixes issues with crashed clients leaving characters in the world for a very long time (default 15 minutes), as well as edge case exploits involving intentionally pausing client execution for some amount of time.
This commit is contained in:
@@ -355,9 +355,12 @@ class WorldSession
|
||||
else
|
||||
m_timeOutTime -= diff;
|
||||
}
|
||||
void ResetTimeOutTime()
|
||||
void ResetTimeOutTime(bool onlyActive)
|
||||
{
|
||||
m_timeOutTime = sWorld->getIntConfig(CONFIG_SOCKET_TIMEOUTTIME);
|
||||
if (GetPlayer())
|
||||
m_timeOutTime = int32(sWorld->getIntConfig(CONFIG_SOCKET_TIMEOUTTIME_ACTIVE));
|
||||
else if (!onlyActive)
|
||||
m_timeOutTime = int32(sWorld->getIntConfig(CONFIG_SOCKET_TIMEOUTTIME));
|
||||
}
|
||||
bool IsConnectionIdle() const
|
||||
{
|
||||
|
||||
Reference in New Issue
Block a user