From 472785a5e84c8f7f0cc9ff77b6047142d7f6e032 Mon Sep 17 00:00:00 2001 From: "Justin Clark-Casey (justincc)" Date: Fri, 22 Jun 2012 01:57:14 +0100 Subject: [PATCH] Eliminate unnecessary extra call to TriggerEmptyScriptCompileQueue in XEngine.DoOnRezScriptQueue() The later invocation of this function will happen on an empty compile queue. --- OpenSim/Region/ScriptEngine/XEngine/XEngine.cs | 11 ++--------- 1 file changed, 2 insertions(+), 9 deletions(-) diff --git a/OpenSim/Region/ScriptEngine/XEngine/XEngine.cs b/OpenSim/Region/ScriptEngine/XEngine/XEngine.cs index 90cf091e8b..e163c6ca49 100644 --- a/OpenSim/Region/ScriptEngine/XEngine/XEngine.cs +++ b/OpenSim/Region/ScriptEngine/XEngine/XEngine.cs @@ -855,13 +855,6 @@ namespace OpenSim.Region.ScriptEngine.XEngine { m_InitialStartup = false; System.Threading.Thread.Sleep(15000); - - if (m_CompileQueue.Count == 0) - { - // No scripts on region, so won't get triggered later - // by the queue becoming empty so we trigger it here - m_Scene.EventManager.TriggerEmptyScriptCompileQueue(0, String.Empty); - } } object[] o; @@ -889,11 +882,11 @@ namespace OpenSim.Region.ScriptEngine.XEngine // due to a race condition // lock (m_CompileQueue) - { m_CurrentCompile = null; - } + m_Scene.EventManager.TriggerEmptyScriptCompileQueue(m_ScriptFailCount, m_ScriptErrorMessage); + m_ScriptFailCount = 0; return null;