From 130b817c37ecc003238191ea368bc6bc8616f1f1 Mon Sep 17 00:00:00 2001 From: UbitUmarov Date: Thu, 26 Mar 2026 02:14:30 +0000 Subject: [PATCH] make sure udpserver client logout is called and is last --- .../Region/ClientStack/Linden/UDP/LLClientView.cs | 14 ++++++++++++-- .../Region/ClientStack/Linden/UDP/LLUDPServer.cs | 3 +-- 2 files changed, 13 insertions(+), 4 deletions(-) diff --git a/OpenSim/Region/ClientStack/Linden/UDP/LLClientView.cs b/OpenSim/Region/ClientStack/Linden/UDP/LLClientView.cs index 9333755e23..41ba73a3ed 100755 --- a/OpenSim/Region/ClientStack/Linden/UDP/LLClientView.cs +++ b/OpenSim/Region/ClientStack/Linden/UDP/LLClientView.cs @@ -12201,7 +12201,12 @@ namespace OpenSim.Region.ClientStack.LindenUDP { var lrp = (LogoutRequestPacket)packet; m_log.Info($"[CLIENT]: Got a logout request for {c.Name} in {c.Scene.Name}"); - c.OnLogout?.Invoke(c); + try + { + c.OnLogout?.Invoke(c); + } + catch { } + c.UDPServer.LogoutHandler(c); } /// @@ -12212,7 +12217,12 @@ namespace OpenSim.Region.ClientStack.LindenUDP protected virtual void Logout(IClientAPI client) { m_log.Info($"[CLIENT]: Got a logout request for {Name} in {Scene.Name}"); - OnLogout?.Invoke(client); + try + { + OnLogout?.Invoke(client); + } + catch { } + UDPServer.LogoutHandler(client); } /// diff --git a/OpenSim/Region/ClientStack/Linden/UDP/LLUDPServer.cs b/OpenSim/Region/ClientStack/Linden/UDP/LLUDPServer.cs index 4ce02236ba..7fc85b0d72 100755 --- a/OpenSim/Region/ClientStack/Linden/UDP/LLUDPServer.cs +++ b/OpenSim/Region/ClientStack/Linden/UDP/LLUDPServer.cs @@ -1732,7 +1732,6 @@ namespace OpenSim.Region.ClientStack.LindenUDP LLUDPClient udpClient = new(this, ThrottleRates, Throttle, circuitCode, agentID, remoteEndPoint, m_defaultRTO, m_maxRTO); client = new LLClientView(Scene, this, udpClient, sessionInfo, agentID, sessionID, circuitCode); - client.OnLogout += LogoutHandler; client.DebugPacketLevel = DefaultClientPacketDebugLevel; ((LLClientView)client).DisableFacelights = m_disableFacelights; @@ -1948,7 +1947,7 @@ namespace OpenSim.Region.ClientStack.LindenUDP #endregion - protected void LogoutHandler(IClientAPI client) + public void LogoutHandler(IClientAPI client) { client.SendLogoutPacket();