diff options
Diffstat (limited to 'OpenSim/Region/ScriptEngine/Common/ScriptEngineBase/MaintenanceThread.cs')
-rw-r--r-- | OpenSim/Region/ScriptEngine/Common/ScriptEngineBase/MaintenanceThread.cs | 15 |
1 files changed, 8 insertions, 7 deletions
diff --git a/OpenSim/Region/ScriptEngine/Common/ScriptEngineBase/MaintenanceThread.cs b/OpenSim/Region/ScriptEngine/Common/ScriptEngineBase/MaintenanceThread.cs index dc98637..fc2fda9 100644 --- a/OpenSim/Region/ScriptEngine/Common/ScriptEngineBase/MaintenanceThread.cs +++ b/OpenSim/Region/ScriptEngine/Common/ScriptEngineBase/MaintenanceThread.cs | |||
@@ -38,19 +38,20 @@ namespace OpenSim.Region.ScriptEngine.Common.ScriptEngineBase | |||
38 | /// <summary> | 38 | /// <summary> |
39 | /// Maintenance thread. Enforcing max execution time for example. | 39 | /// Maintenance thread. Enforcing max execution time for example. |
40 | /// </summary> | 40 | /// </summary> |
41 | public static Thread MaintenanceThreadThread; | 41 | public Thread MaintenanceThreadThread; |
42 | 42 | ||
43 | /// <summary> | 43 | /// <summary> |
44 | /// Starts maintenance thread | 44 | /// Starts maintenance thread |
45 | /// </summary> | 45 | /// </summary> |
46 | private void StartMaintenanceThread() | 46 | private void StartMaintenanceThread() |
47 | { | 47 | { |
48 | StopMaintenanceThread(); | 48 | if (MaintenanceThreadThread == null) |
49 | 49 | { | |
50 | MaintenanceThreadThread = new Thread(MaintenanceLoop); | 50 | MaintenanceThreadThread = new Thread(MaintenanceLoop); |
51 | MaintenanceThreadThread.Name = "ScriptMaintenanceThread"; | 51 | MaintenanceThreadThread.Name = "ScriptMaintenanceThread"; |
52 | MaintenanceThreadThread.IsBackground = true; | 52 | MaintenanceThreadThread.IsBackground = true; |
53 | MaintenanceThreadThread.Start(); | 53 | MaintenanceThreadThread.Start(); |
54 | } | ||
54 | } | 55 | } |
55 | 56 | ||
56 | /// <summary> | 57 | /// <summary> |