From 42b2248960b9b8e539f551093ed2241ce8d3b68d Mon Sep 17 00:00:00 2001 From: Melanie Thielker Date: Sat, 13 Sep 2014 00:49:32 +0200 Subject: If a client's SceneAgent is null, that client is not fully logged in or crashed while logging out. Don't reuse it, create a new one. --- OpenSim/Region/ClientStack/Linden/UDP/LLUDPServer.cs | 14 ++++++++++++++ 1 file changed, 14 insertions(+) (limited to 'OpenSim/Region') diff --git a/OpenSim/Region/ClientStack/Linden/UDP/LLUDPServer.cs b/OpenSim/Region/ClientStack/Linden/UDP/LLUDPServer.cs index 9b3802d..5ce82a5 100644 --- a/OpenSim/Region/ClientStack/Linden/UDP/LLUDPServer.cs +++ b/OpenSim/Region/ClientStack/Linden/UDP/LLUDPServer.cs @@ -2002,6 +2002,7 @@ namespace OpenSim.Region.ClientStack.LindenUDP uint circuitCode, UUID agentID, UUID sessionID, IPEndPoint remoteEndPoint, AuthenticateResponse sessionInfo) { IClientAPI client = null; + bool createNew = false; // We currently synchronize this code across the whole scene to avoid issues such as // http://opensimulator.org/mantis/view.php?id=5365 However, once locking per agent circuit can be done @@ -2010,6 +2011,19 @@ namespace OpenSim.Region.ClientStack.LindenUDP { if (!m_scene.TryGetClient(agentID, out client)) { + createNew = true; + } + else + { + if (client.SceneAgent == null) + { + m_scene.CloseAgent(agentID, true); + createNew = true; + } + } + + if (createNew) + { LLUDPClient udpClient = new LLUDPClient(this, ThrottleRates, m_throttle, circuitCode, agentID, remoteEndPoint, m_defaultRTO, m_maxRTO); client = new LLClientView(m_scene, this, udpClient, sessionInfo, agentID, sessionID, circuitCode); -- cgit v1.1