From 1314a02a95c062e45f3526252a8bc8c1d022ba7d Mon Sep 17 00:00:00 2001 From: UbitUmarov Date: Fri, 15 Aug 2014 17:44:24 +0100 Subject: adjust createAgent delay on childs creation. Beeing bad, it should be high enougth to reasonable account for grid and region lag spikes --- .../Framework/EntityTransfer/EntityTransferModule.cs | 12 +++++++++--- 1 file changed, 9 insertions(+), 3 deletions(-) diff --git a/OpenSim/Region/CoreModules/Framework/EntityTransfer/EntityTransferModule.cs b/OpenSim/Region/CoreModules/Framework/EntityTransfer/EntityTransferModule.cs index 4d6b471..2bbb0a0 100644 --- a/OpenSim/Region/CoreModules/Framework/EntityTransfer/EntityTransferModule.cs +++ b/OpenSim/Region/CoreModules/Framework/EntityTransfer/EntityTransferModule.cs @@ -2097,15 +2097,21 @@ namespace OpenSim.Region.CoreModules.Framework.EntityTransfer string reason = String.Empty; + int ts = Util.EnvironmentTickCount(); bool regionAccepted = scene.SimulationService.CreateAgent(reg, a, (uint)TeleportFlags.Default, out reason); +// m_log.DebugFormat("[ENTITY TRANSFER MODULE] SimulationService.CreateAgent took {0}ms",Util.EnvironmentTickCountSubtract(ts)); + if (regionAccepted && newAgent) { - // give some time for createAgent finish possible async tasks - // does nothing usefull... out -// int dly = 100 - sp.ControllingClient.PingTimeMS; + // give time for createAgent to finish, since it is async and does grid services access + +// int dly = 500 - sp.ControllingClient.PingTimeMS; // if (dly > 20) // Thread.Sleep(dly); + // ping is unrealiable after a login :(, just delay a fair amount + + Thread.Sleep(500); if (m_eqModule != null) { -- cgit v1.1