adjust createAgent delay on childs creation. Beeing bad, it should be high

enougth to reasonable account for grid and region lag spikes
avinationmerge
UbitUmarov 2014-08-15 17:44:24 +01:00
parent 117d563fd4
commit 1314a02a95
1 changed files with 9 additions and 3 deletions

View File

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