From d790ea4868cff9d450c739a07118f827912592e7 Mon Sep 17 00:00:00 2001 From: UbitUmarov Date: Sat, 5 Nov 2022 14:30:50 +0000 Subject: [PATCH] do not waste time sending a message back to client on DeactivateClientDueToTimeout..., that most likely will fail --- .../ClientStack/Linden/UDP/LLUDPServer.cs | 19 ++++++------------- 1 file changed, 6 insertions(+), 13 deletions(-) diff --git a/OpenSim/Region/ClientStack/Linden/UDP/LLUDPServer.cs b/OpenSim/Region/ClientStack/Linden/UDP/LLUDPServer.cs index a96af2d18b..19e6a668c5 100755 --- a/OpenSim/Region/ClientStack/Linden/UDP/LLUDPServer.cs +++ b/OpenSim/Region/ClientStack/Linden/UDP/LLUDPServer.cs @@ -1038,7 +1038,6 @@ namespace OpenSim.Region.ClientStack.LindenUDP // Fire this out on a different thread so that we don't hold up outgoing packet processing for // everybody else if this is being called due to an ack timeout. - // This is the same as processing as the async process of a logout request. Util.FireAndForget( o => DeactivateClientDueToTimeout(client, timeoutTicks), null, "LLUDPServer.DeactivateClientDueToTimeout"); @@ -1760,19 +1759,13 @@ namespace OpenSim.Region.ClientStack.LindenUDP /// protected void DeactivateClientDueToTimeout(LLClientView client, int timeoutTicks) { - lock (client.CloseSyncLock) + ClientLogoutsDueToNoReceives++; + + if (client.SceneAgent != null) { - ClientLogoutsDueToNoReceives++; - - if (client.SceneAgent != null) - { - m_log.WarnFormat( - "[LLUDPSERVER]: No packets received from {0} agent of {1} for {2}ms in {3}. Disconnecting.", - client.SceneAgent.IsChildAgent ? "child" : "root", client.Name, timeoutTicks, Scene.Name); - - if (!client.SceneAgent.IsChildAgent) - client.Kick("Simulator logged you out due to connection timeout."); - } + m_log.WarnFormat( + "[LLUDPSERVER]: No packets received from {0} agent of {1} for {2}ms in {3}. Disconnecting.", + client.SceneAgent.IsChildAgent ? "child" : "root", client.Name, timeoutTicks, Scene.Name); } if (!Scene.CloseAgent(client.AgentId, true))