aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/OpenSim
diff options
context:
space:
mode:
Diffstat (limited to 'OpenSim')
-rw-r--r--OpenSim/Region/CoreModules/Framework/EntityTransfer/EntityTransferModule.cs19
1 files changed, 14 insertions, 5 deletions
diff --git a/OpenSim/Region/CoreModules/Framework/EntityTransfer/EntityTransferModule.cs b/OpenSim/Region/CoreModules/Framework/EntityTransfer/EntityTransferModule.cs
index 71148ea..b0483e0 100644
--- a/OpenSim/Region/CoreModules/Framework/EntityTransfer/EntityTransferModule.cs
+++ b/OpenSim/Region/CoreModules/Framework/EntityTransfer/EntityTransferModule.cs
@@ -1870,7 +1870,7 @@ namespace OpenSim.Region.CoreModules.Framework.EntityTransfer
1870 if (external != null) 1870 if (external != null)
1871 { 1871 {
1872 InformClientOfNeighbourDelegate d = InformClientOfNeighbourAsync; 1872 InformClientOfNeighbourDelegate d = InformClientOfNeighbourAsync;
1873 d.BeginInvoke(sp, agent, region, external, true, 1873 d.BeginInvoke(sp, agent, region, external, true,true,
1874 InformClientOfNeighbourCompleted, 1874 InformClientOfNeighbourCompleted,
1875 d); 1875 d);
1876 } 1876 }
@@ -1880,7 +1880,7 @@ namespace OpenSim.Region.CoreModules.Framework.EntityTransfer
1880 #region Enable Child Agents 1880 #region Enable Child Agents
1881 1881
1882 private delegate void InformClientOfNeighbourDelegate( 1882 private delegate void InformClientOfNeighbourDelegate(
1883 ScenePresence avatar, AgentCircuitData a, GridRegion reg, IPEndPoint endPoint, bool newAgent); 1883 ScenePresence avatar, AgentCircuitData a, GridRegion reg, IPEndPoint endPoint, bool newAgent, bool doInitialDelay);
1884 1884
1885 /// <summary> 1885 /// <summary>
1886 /// This informs all neighbouring regions about agent "avatar". 1886 /// This informs all neighbouring regions about agent "avatar".
@@ -1993,6 +1993,7 @@ namespace OpenSim.Region.CoreModules.Framework.EntityTransfer
1993 1993
1994 bool newAgent = false; 1994 bool newAgent = false;
1995 int count = 0; 1995 int count = 0;
1996 bool delay = true;
1996 foreach (GridRegion neighbour in neighbours) 1997 foreach (GridRegion neighbour in neighbours)
1997 { 1998 {
1998 //m_log.WarnFormat("--> Going to send child agent to {0}", neighbour.RegionName); 1999 //m_log.WarnFormat("--> Going to send child agent to {0}", neighbour.RegionName);
@@ -2010,7 +2011,9 @@ namespace OpenSim.Region.CoreModules.Framework.EntityTransfer
2010 // Let's put this back at sync, so that it doesn't clog 2011 // Let's put this back at sync, so that it doesn't clog
2011 // the network, especially for regions in the same physical server. 2012 // the network, especially for regions in the same physical server.
2012 // We're really not in a hurry here. 2013 // We're really not in a hurry here.
2013 InformClientOfNeighbourAsync(sp, cagents[count], neighbour, neighbour.ExternalEndPoint, newAgent); 2014 InformClientOfNeighbourAsync(sp, cagents[count], neighbour, neighbour.ExternalEndPoint, newAgent, delay);
2015 delay = false; // ugly i know.. but there aren't that many neighbours
2016
2014 //InformClientOfNeighbourDelegate d = InformClientOfNeighbourAsync; 2017 //InformClientOfNeighbourDelegate d = InformClientOfNeighbourAsync;
2015 //d.BeginInvoke(sp, cagents[count], neighbour, neighbour.ExternalEndPoint, newAgent, 2018 //d.BeginInvoke(sp, cagents[count], neighbour, neighbour.ExternalEndPoint, newAgent,
2016 // InformClientOfNeighbourCompleted, 2019 // InformClientOfNeighbourCompleted,
@@ -2077,11 +2080,12 @@ namespace OpenSim.Region.CoreModules.Framework.EntityTransfer
2077 /// <param name="regionHandle"></param> 2080 /// <param name="regionHandle"></param>
2078 /// <param name="endPoint"></param> 2081 /// <param name="endPoint"></param>
2079 private void InformClientOfNeighbourAsync(ScenePresence sp, AgentCircuitData a, GridRegion reg, 2082 private void InformClientOfNeighbourAsync(ScenePresence sp, AgentCircuitData a, GridRegion reg,
2080 IPEndPoint endPoint, bool newAgent) 2083 IPEndPoint endPoint, bool newAgent,bool doinitialdelay)
2081 { 2084 {
2082 // Let's wait just a little to give time to originating regions to catch up with closing child agents 2085 // Let's wait just a little to give time to originating regions to catch up with closing child agents
2083 // after a cross here 2086 // after a cross here
2084 Thread.Sleep(500); 2087 if(doinitialdelay)
2088 Thread.Sleep(500);
2085 2089
2086 Scene scene = sp.Scene; 2090 Scene scene = sp.Scene;
2087 2091
@@ -2097,6 +2101,11 @@ namespace OpenSim.Region.CoreModules.Framework.EntityTransfer
2097 2101
2098 if (regionAccepted && newAgent) 2102 if (regionAccepted && newAgent)
2099 { 2103 {
2104 // give some time for createAgent finish possible async tasks
2105 int dly = 100 - sp.ControllingClient.PingTimeMS;
2106 if (dly > 20)
2107 Thread.Sleep(dly);
2108
2100 if (m_eqModule != null) 2109 if (m_eqModule != null)
2101 { 2110 {
2102 #region IP Translation for NAT 2111 #region IP Translation for NAT