From 5eff68e6bbf42a880bd042cd350e7d12201dc2c7 Mon Sep 17 00:00:00 2001 From: Tedd Hansen Date: Fri, 22 Feb 2008 23:45:17 +0000 Subject: [PATCH] Fix for error message during startup (shared thread started processing region queue before queue objects were fully operational) --- .../Common/ScriptEngineBase/EventQueueThreadClass.cs | 3 +++ .../ScriptEngine/Common/ScriptEngineBase/ScriptEngine.cs | 2 +- 2 files changed, 4 insertions(+), 1 deletion(-) diff --git a/OpenSim/Region/ScriptEngine/Common/ScriptEngineBase/EventQueueThreadClass.cs b/OpenSim/Region/ScriptEngine/Common/ScriptEngineBase/EventQueueThreadClass.cs index caf043d9e0..3a237da3d7 100644 --- a/OpenSim/Region/ScriptEngine/Common/ScriptEngineBase/EventQueueThreadClass.cs +++ b/OpenSim/Region/ScriptEngine/Common/ScriptEngineBase/EventQueueThreadClass.cs @@ -225,6 +225,9 @@ namespace OpenSim.Region.ScriptEngine.Common.ScriptEngineBase //if (PleaseShutdown) // return; + if (m_ScriptEngine.m_EventQueueManager == null || m_ScriptEngine.m_EventQueueManager.eventQueue == null) + continue; + if (m_ScriptEngine.m_EventQueueManager.eventQueue.Count == 0) { // Nothing to do? Sleep a bit waiting for something to do diff --git a/OpenSim/Region/ScriptEngine/Common/ScriptEngineBase/ScriptEngine.cs b/OpenSim/Region/ScriptEngine/Common/ScriptEngineBase/ScriptEngine.cs index ac115e9da5..0d551c6681 100644 --- a/OpenSim/Region/ScriptEngine/Common/ScriptEngineBase/ScriptEngine.cs +++ b/OpenSim/Region/ScriptEngine/Common/ScriptEngineBase/ScriptEngine.cs @@ -54,7 +54,7 @@ namespace OpenSim.Region.ScriptEngine.Common.ScriptEngineBase public ScriptManager m_ScriptManager; // Load, unload and execute scripts public AppDomainManager m_AppDomainManager; // Handles loading/unloading of scripts into AppDomains public AsyncLSLCommandManager m_ASYNCLSLCommandManager; // Asyncronous LSL commands (commands that returns with an event) - public static MaintenanceThread m_MaintenanceThread; // Thread that does different kinds of maintenance, for example refreshing config and killing scripts that has been running too long + public static MaintenanceThread m_MaintenanceThread; // Thread that does different kinds of maintenance, for example refreshing config and killing scripts that has been running too long public IConfigSource ConfigSource; public IConfig ScriptConfigSource;