mirror of
https://github.com/mod-playerbots/azerothcore-wotlk.git
synced 2026-01-29 16:43:47 +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:
@@ -375,7 +375,7 @@ bool World::RemoveQueuedPlayer(WorldSession* sess)
|
||||
if (*iter == sess)
|
||||
{
|
||||
sess->SetInQueue(false);
|
||||
sess->ResetTimeOutTime();
|
||||
sess->ResetTimeOutTime(false);
|
||||
iter = m_QueuedPlayer.erase(iter);
|
||||
found = true;
|
||||
break;
|
||||
@@ -394,7 +394,7 @@ bool World::RemoveQueuedPlayer(WorldSession* sess)
|
||||
{
|
||||
WorldSession* pop_sess = m_QueuedPlayer.front();
|
||||
pop_sess->SetInQueue(false);
|
||||
pop_sess->ResetTimeOutTime();
|
||||
pop_sess->ResetTimeOutTime(false);
|
||||
pop_sess->SendAuthWaitQue(0);
|
||||
pop_sess->SendAddonsInfo();
|
||||
|
||||
@@ -690,6 +690,7 @@ void World::LoadConfigSettings(bool reload)
|
||||
m_int_configs[CONFIG_PORT_WORLD] = sConfigMgr->GetIntDefault("WorldServerPort", 8085);
|
||||
|
||||
m_int_configs[CONFIG_SOCKET_TIMEOUTTIME] = sConfigMgr->GetIntDefault("SocketTimeOutTime", 900000);
|
||||
m_int_configs[CONFIG_SOCKET_TIMEOUTTIME_ACTIVE] = sConfigMgr->GetIntDefault("SocketTimeOutTimeActive", 60000);
|
||||
m_int_configs[CONFIG_SESSION_ADD_DELAY] = sConfigMgr->GetIntDefault("SessionAddDelay", 10000);
|
||||
|
||||
m_float_configs[CONFIG_GROUP_XP_DISTANCE] = sConfigMgr->GetFloatDefault("MaxGroupXPDistance", 74.0f);
|
||||
|
||||
@@ -330,6 +330,7 @@ enum WorldIntConfigs
|
||||
CONFIG_WARDEN_NUM_MEM_CHECKS,
|
||||
CONFIG_WARDEN_NUM_OTHER_CHECKS,
|
||||
CONFIG_BIRTHDAY_TIME,
|
||||
CONFIG_SOCKET_TIMEOUTTIME_ACTIVE,
|
||||
INT_CONFIG_VALUE_COUNT
|
||||
};
|
||||
|
||||
|
||||
Reference in New Issue
Block a user