Minor adjustment on timings of waits.

TeleportWork
Diva Canto 2013-07-22 20:20:48 -07:00
parent c0433d5e4c
commit 14530b2607
2 changed files with 21 additions and 6 deletions

View File

@ -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)

View File

@ -4226,10 +4226,10 @@ namespace OpenSim.Region.Framework.Scenes
if (cAgentData.SenderWantsToWaitForRoot)
{
while (childAgentUpdate.IsChildAgent && ntimes-- > 0)
Thread.Sleep(500);
Thread.Sleep(1000);
m_log.DebugFormat(
"[SCENE PRESENCE]: Found presence {0} {1} {2} in {3} after {4} waits",
"[SCENE]: Found presence {0} {1} {2} in {3} after {4} waits",
childAgentUpdate.Name, childAgentUpdate.UUID, childAgentUpdate.IsChildAgent ? "child" : "root", RegionInfo.RegionName, 20 - ntimes);
if (childAgentUpdate.IsChildAgent)