aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/OpenSim/Region/ScriptEngine/Common/ScriptEngineBase/MaintenanceThread.cs
diff options
context:
space:
mode:
Diffstat (limited to 'OpenSim/Region/ScriptEngine/Common/ScriptEngineBase/MaintenanceThread.cs')
-rw-r--r--OpenSim/Region/ScriptEngine/Common/ScriptEngineBase/MaintenanceThread.cs10
1 files changed, 8 insertions, 2 deletions
diff --git a/OpenSim/Region/ScriptEngine/Common/ScriptEngineBase/MaintenanceThread.cs b/OpenSim/Region/ScriptEngine/Common/ScriptEngineBase/MaintenanceThread.cs
index 1a5cca1..14f7c4f 100644
--- a/OpenSim/Region/ScriptEngine/Common/ScriptEngineBase/MaintenanceThread.cs
+++ b/OpenSim/Region/ScriptEngine/Common/ScriptEngineBase/MaintenanceThread.cs
@@ -58,7 +58,12 @@ namespace OpenSim.Region.ScriptEngine.Common.ScriptEngineBase
58 58
59 public void ReadConfig() 59 public void ReadConfig()
60 { 60 {
61 MaintenanceLoopms = m_ScriptEngine.ScriptConfigSource.GetInt("MaintenanceLoopms", 50); 61 // Bad hack, but we need a m_ScriptEngine :)
62 foreach (ScriptEngine m_ScriptEngine in ScriptEngine.ScriptEngines)
63 {
64 MaintenanceLoopms = m_ScriptEngine.ScriptConfigSource.GetInt("MaintenanceLoopms", 50);
65 return;
66 }
62 } 67 }
63 68
64 #region " Maintenance thread " 69 #region " Maintenance thread "
@@ -169,7 +174,8 @@ namespace OpenSim.Region.ScriptEngine.Common.ScriptEngineBase
169 } 174 }
170 catch (Exception ex) 175 catch (Exception ex)
171 { 176 {
172 ScriptEngine.Log.Error("[" + lastScriptEngine.ScriptEngineName + "]: Exception in MaintenanceLoopThread. Thread will recover after 5 sec throttle. Exception: " + ex.ToString()); 177 if (lastScriptEngine != null)
178 lastScriptEngine.Log.Error("[" + lastScriptEngine.ScriptEngineName + "]: Exception in MaintenanceLoopThread. Thread will recover after 5 sec throttle. Exception: " + ex.ToString());
173 Thread.Sleep(5000); 179 Thread.Sleep(5000);
174 } 180 }
175 } 181 }