diff options
Diffstat (limited to 'OpenSim/Region/ScriptEngine/Common/ScriptEngineBase/ScriptManager.cs')
-rw-r--r-- | OpenSim/Region/ScriptEngine/Common/ScriptEngineBase/ScriptManager.cs | 8 |
1 files changed, 7 insertions, 1 deletions
diff --git a/OpenSim/Region/ScriptEngine/Common/ScriptEngineBase/ScriptManager.cs b/OpenSim/Region/ScriptEngine/Common/ScriptEngineBase/ScriptManager.cs index 60333b1..47cb2fd 100644 --- a/OpenSim/Region/ScriptEngine/Common/ScriptEngineBase/ScriptManager.cs +++ b/OpenSim/Region/ScriptEngine/Common/ScriptEngineBase/ScriptManager.cs | |||
@@ -64,6 +64,7 @@ namespace OpenSim.Region.ScriptEngine.Common.ScriptEngineBase | |||
64 | private static bool PrivateThread; | 64 | private static bool PrivateThread; |
65 | private int LoadUnloadMaxQueueSize; | 65 | private int LoadUnloadMaxQueueSize; |
66 | private Object scriptLock = new Object(); | 66 | private Object scriptLock = new Object(); |
67 | private bool m_started = false; | ||
67 | 68 | ||
68 | // Load/Unload structure | 69 | // Load/Unload structure |
69 | private struct LUStruct | 70 | private struct LUStruct |
@@ -119,6 +120,8 @@ namespace OpenSim.Region.ScriptEngine.Common.ScriptEngineBase | |||
119 | public abstract void Initialize(); | 120 | public abstract void Initialize(); |
120 | public void Start() | 121 | public void Start() |
121 | { | 122 | { |
123 | m_started = true; | ||
124 | |||
122 | ReadConfig(); | 125 | ReadConfig(); |
123 | Initialize(); | 126 | Initialize(); |
124 | 127 | ||
@@ -213,6 +216,9 @@ namespace OpenSim.Region.ScriptEngine.Common.ScriptEngineBase | |||
213 | 216 | ||
214 | public void DoScriptLoadUnload() | 217 | public void DoScriptLoadUnload() |
215 | { | 218 | { |
219 | if (!m_started) | ||
220 | return; | ||
221 | |||
216 | lock (LUQueue) | 222 | lock (LUQueue) |
217 | { | 223 | { |
218 | if (LUQueue.Count > 0) | 224 | if (LUQueue.Count > 0) |
@@ -258,7 +264,7 @@ namespace OpenSim.Region.ScriptEngine.Common.ScriptEngineBase | |||
258 | { | 264 | { |
259 | lock (LUQueue) | 265 | lock (LUQueue) |
260 | { | 266 | { |
261 | if (LUQueue.Count >= LoadUnloadMaxQueueSize) | 267 | if ((LUQueue.Count >= LoadUnloadMaxQueueSize) && m_started) |
262 | { | 268 | { |
263 | m_scriptEngine.Log.Error("[" + m_scriptEngine.ScriptEngineName + "]: ERROR: Load/unload queue item count is at " + LUQueue.Count + ". Config variable \"LoadUnloadMaxQueueSize\" is set to " + LoadUnloadMaxQueueSize + ", so ignoring new script."); | 269 | m_scriptEngine.Log.Error("[" + m_scriptEngine.ScriptEngineName + "]: ERROR: Load/unload queue item count is at " + LUQueue.Count + ". Config variable \"LoadUnloadMaxQueueSize\" is set to " + LoadUnloadMaxQueueSize + ", so ignoring new script."); |
264 | return; | 270 | return; |