mirror of
https://github.com/mod-playerbots/azerothcore-wotlk.git
synced 2026-01-18 03:15:41 +00:00
feat(core): allow to disable auto-kick for idle players (#1550)
This commit is contained in:
@@ -254,7 +254,7 @@ bool WorldSession::Update(uint32 diff, PacketFilter& updater)
|
||||
|
||||
/// If necessary, kick the player because the client didn't send anything for too long
|
||||
/// (or they've been idling in character select)
|
||||
if (IsConnectionIdle())
|
||||
if (sWorld->getBoolConfig(CONFIG_CLOSE_IDLE_CONNECTIONS) && IsConnectionIdle())
|
||||
m_Socket->CloseSocket();
|
||||
}
|
||||
|
||||
|
||||
@@ -689,6 +689,7 @@ void World::LoadConfigSettings(bool reload)
|
||||
else
|
||||
m_int_configs[CONFIG_PORT_WORLD] = sConfigMgr->GetIntDefault("WorldServerPort", 8085);
|
||||
|
||||
m_bool_configs[CONFIG_CLOSE_IDLE_CONNECTIONS] = sConfigMgr->GetBoolDefault("CloseIdleConnections", true);
|
||||
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);
|
||||
|
||||
@@ -166,6 +166,7 @@ enum WorldBoolConfigs
|
||||
CONFIG_CALCULATE_CREATURE_ZONE_AREA_DATA,
|
||||
CONFIG_CALCULATE_GAMEOBJECT_ZONE_AREA_DATA,
|
||||
CONFIG_CHECK_GOBJECT_LOS,
|
||||
CONFIG_CLOSE_IDLE_CONNECTIONS,
|
||||
BOOL_CONFIG_VALUE_COUNT
|
||||
};
|
||||
|
||||
|
||||
@@ -212,6 +212,15 @@ MaxOverspeedPings = 2
|
||||
|
||||
GridUnload = 1
|
||||
|
||||
#
|
||||
# CloseIdleConnections
|
||||
# Description: Automatically close idle connections.
|
||||
# SocketTimeOutTime and SocketTimeOutTimeActive determine when a connection is considered as idle.
|
||||
# Default: 1 - (enable, Automatically close idle connections)
|
||||
# 0 - (disable, Do not close idle connections)
|
||||
|
||||
CloseIdleConnections = 1
|
||||
|
||||
#
|
||||
# SocketTimeOutTime
|
||||
# Description: Time (in milliseconds) after which a connection being idle on the character
|
||||
|
||||
Reference in New Issue
Block a user