From 7aa171e49f991718ffac9a4749982f130ff7c285 Mon Sep 17 00:00:00 2001 From: Melanie Thielker Date: Fri, 12 Jun 2015 03:16:09 +0200 Subject: Maybe reduce incidence of ghost avatars --- OpenSim/Region/ClientStack/Linden/UDP/LLUDPServer.cs | 11 ++++++++++- 1 file changed, 10 insertions(+), 1 deletion(-) (limited to 'OpenSim') diff --git a/OpenSim/Region/ClientStack/Linden/UDP/LLUDPServer.cs b/OpenSim/Region/ClientStack/Linden/UDP/LLUDPServer.cs index f66534d..b5f9da8 100644 --- a/OpenSim/Region/ClientStack/Linden/UDP/LLUDPServer.cs +++ b/OpenSim/Region/ClientStack/Linden/UDP/LLUDPServer.cs @@ -1757,6 +1757,8 @@ namespace OpenSim.Region.ClientStack.LindenUDP AuthenticateResponse sessionInfo; if (IsClientAuthorized(uccp, out sessionInfo)) { + AgentCircuitData aCircuit = m_scene.AuthenticateHandler.GetAgentCircuitData(uccp.CircuitCode.Code); + // Begin the process of adding the client to the simulator client = AddClient( @@ -1766,6 +1768,14 @@ namespace OpenSim.Region.ClientStack.LindenUDP endPoint, sessionInfo); + // This will be true if the client is new, e.g. not + // an existing child agent, and there is no circuit data + if (client != null && aCircuit == null) + { + m_scene.CloseAgent(client.AgentId, true); + return; + } + // Now we know we can handle more data Thread.Sleep(200); @@ -1802,7 +1812,6 @@ namespace OpenSim.Region.ClientStack.LindenUDP // We only want to send initial data to new clients, not ones which are being converted from child to root. if (client != null) { - AgentCircuitData aCircuit = m_scene.AuthenticateHandler.GetAgentCircuitData(uccp.CircuitCode.Code); bool tp = (aCircuit.teleportFlags > 0); // Let's delay this for TP agents, otherwise the viewer doesn't know where to get resources from if (!tp) -- cgit v1.1