From 14530b260764372df3627206c531b96b9d817dbe Mon Sep 17 00:00:00 2001 From: Diva Canto Date: Mon, 22 Jul 2013 20:20:48 -0700 Subject: Minor adjustment on timings of waits. --- .../Region/ClientStack/Linden/UDP/LLUDPServer.cs | 23 ++++++++++++++++++---- 1 file changed, 19 insertions(+), 4 deletions(-) (limited to 'OpenSim/Region/ClientStack') diff --git a/OpenSim/Region/ClientStack/Linden/UDP/LLUDPServer.cs b/OpenSim/Region/ClientStack/Linden/UDP/LLUDPServer.cs index 1b72b26..43167ee 100644 --- a/OpenSim/Region/ClientStack/Linden/UDP/LLUDPServer.cs +++ b/OpenSim/Region/ClientStack/Linden/UDP/LLUDPServer.cs @@ -1631,11 +1631,26 @@ namespace OpenSim.Region.ClientStack.LindenUDP CompleteAgentMovementPacket packet = (CompleteAgentMovementPacket)array[1]; // Determine which agent this packet came from - int count = 10; - while (!m_scene.TryGetClient(endPoint, out client) && count-- > 0) + int count = 20; + bool ready = false; + while (!ready && count-- > 0) { - m_log.Debug("[LLUDPSERVER]: Received a CompleteMovementIntoRegion in " + m_scene.RegionInfo.RegionName + " (not ready yet)"); - Thread.Sleep(200); + if (m_scene.TryGetClient(endPoint, out client) && client.IsActive) + { + LLUDPClient udpClient = ((LLClientView)client).UDPClient; + if (udpClient != null && udpClient.IsConnected) + ready = true; + else + { + m_log.Debug("[LLUDPSERVER]: Received a CompleteMovementIntoRegion in " + m_scene.RegionInfo.RegionName + " (not ready yet)"); + Thread.Sleep(200); + } + } + else + { + m_log.Debug("[LLUDPSERVER]: Received a CompleteMovementIntoRegion in " + m_scene.RegionInfo.RegionName + " (not ready yet)"); + Thread.Sleep(200); + } } if (client == null) -- cgit v1.1