From 6b8b7007c4a8c5ed3386093fd0cfac0032587121 Mon Sep 17 00:00:00 2001 From: UbitUmarov Date: Tue, 10 Jul 2012 18:23:38 +0100 Subject: console region restart: Let Xengine not cry all over the place with errors also. May not be that good, but is not in use in AVN (i hope). Still safer to do a full shutdown and refire the region from a OS tool like a script, monit, etc etc --- OpenSim/Region/ScriptEngine/XEngine/XEngine.cs | 16 ++++++++++------ 1 file changed, 10 insertions(+), 6 deletions(-) diff --git a/OpenSim/Region/ScriptEngine/XEngine/XEngine.cs b/OpenSim/Region/ScriptEngine/XEngine/XEngine.cs index 1e0f01f..2a01fc4 100644 --- a/OpenSim/Region/ScriptEngine/XEngine/XEngine.cs +++ b/OpenSim/Region/ScriptEngine/XEngine/XEngine.cs @@ -596,7 +596,11 @@ namespace OpenSim.Region.ScriptEngine.XEngine if (!m_Enabled) return; lockScriptsForRead(true); - foreach (IScriptInstance instance in m_Scripts.Values) + + List instancesToDel = new List(m_Scripts.Values); + +// foreach (IScriptInstance instance in m_Scripts.Values) + foreach (IScriptInstance instance in instancesToDel) { // Force a final state save // @@ -619,7 +623,7 @@ namespace OpenSim.Region.ScriptEngine.XEngine // Must be done explicitly because they have infinite // lifetime // - if (!m_SimulatorShuttingDown) +// if (!m_SimulatorShuttingDown) { m_DomainScripts[instance.AppDomain].Remove(instance.ItemID); if (m_DomainScripts[instance.AppDomain].Count == 0) @@ -629,10 +633,10 @@ namespace OpenSim.Region.ScriptEngine.XEngine } } - m_Scripts.Clear(); - m_PrimObjects.Clear(); - m_Assemblies.Clear(); - m_DomainScripts.Clear(); +// m_Scripts.Clear(); +// m_PrimObjects.Clear(); +// m_Assemblies.Clear(); +// m_DomainScripts.Clear(); } lockScriptsForRead(false); lockScriptsForWrite(true); -- cgit v1.1