From 4738fead21f9d02c23702613fd1e1eec1d1a75a1 Mon Sep 17 00:00:00 2001 From: Teravus Ovares Date: Thu, 29 Nov 2007 07:25:58 +0000 Subject: * Added a 50 second restart notify timer that gets reset when new regions come up to give servers that host a lot of sims a long time to start listening. --- OpenSim/Region/Environment/Scenes/Scene.cs | 54 +++++++++++++++--------------- 1 file changed, 27 insertions(+), 27 deletions(-) (limited to 'OpenSim/Region/Environment/Scenes/Scene.cs') diff --git a/OpenSim/Region/Environment/Scenes/Scene.cs b/OpenSim/Region/Environment/Scenes/Scene.cs index a52e636..9ea92b0 100644 --- a/OpenSim/Region/Environment/Scenes/Scene.cs +++ b/OpenSim/Region/Environment/Scenes/Scene.cs @@ -279,39 +279,21 @@ namespace OpenSim.Region.Environment.Scenes { if (Math.Abs(otherRegion.RegionLocX - RegionInfo.RegionLocX) <= 1 || Math.Abs(otherRegion.RegionLocY - RegionInfo.RegionLocY) <= 1) { - try - { - - ForEachScenePresence(delegate(ScenePresence agent) - { - if (!(agent.IsChildAgent)) - { - //agent.ControllingClient.new - //this.CommsManager.InterRegion.InformRegionOfChildAgent(otherRegion.RegionHandle, agent.ControllingClient.RequestClientInfo()); - InformClientOfNeighbor(agent, otherRegion); - } - } - - ); - } - catch (System.NullReferenceException) + if (!(m_regionRestartNotifyList.Contains(otherRegion))) { - // This means that we're not booted up completely yet. + m_regionRestartNotifyList.Add(otherRegion); + + m_restartWaitTimer.Interval= 50000; + m_restartWaitTimer.AutoReset = false; + m_restartWaitTimer.Elapsed += new ElapsedEventHandler(restart_Notify_Wait_Elapsed); + m_restartWaitTimer.Start(); } } else { MainLog.Instance.Verbose("INTERGRID", "Got notice about Region at X:" + otherRegion.RegionLocX.ToString() + " Y:" + otherRegion.RegionLocY.ToString() + " but it was too far away to send to the client"); } - //if (!(m_regionRestartNotifyList.Contains(otherRegion))) - //{ - //m_regionRestartNotifyList.Add(otherRegion); - - //m_restartWaitTimer = new Timer(20000); - //m_restartWaitTimer.AutoReset = false; - // m_restartWaitTimer.Elapsed += new ElapsedEventHandler(restart_Notify_Wait_Elapsed); - //m_restartWaitTimer.Start(); - //} + } return true; } @@ -368,7 +350,25 @@ namespace OpenSim.Region.Environment.Scenes m_restartWaitTimer.Stop(); foreach (RegionInfo region in m_regionRestartNotifyList) { - + try + { + + ForEachScenePresence(delegate(ScenePresence agent) + { + if (!(agent.IsChildAgent)) + { + //agent.ControllingClient.new + //this.CommsManager.InterRegion.InformRegionOfChildAgent(otherRegion.RegionHandle, agent.ControllingClient.RequestClientInfo()); + InformClientOfNeighbor(agent, region); + } + } + + ); + } + catch (System.NullReferenceException) + { + // This means that we're not booted up completely yet. + } } // Reset list to nothing. m_regionRestartNotifyList = new List(); -- cgit v1.1