diff options
author | Tedd Hansen | 2008-02-21 23:43:58 +0000 |
---|---|---|
committer | Tedd Hansen | 2008-02-21 23:43:58 +0000 |
commit | f75e418211fa072b03515e19f770ee20ba9a80d6 (patch) | |
tree | 22a2338ad41f65fcd563ef9a59daa628469aa46f /OpenSim/Region/ScriptEngine/Common/ScriptEngineBase/MaintenanceThread.cs | |
parent | * Fixed an issue where the client thread was aborted before the UDP server se... (diff) | |
download | opensim-SC_OLD-f75e418211fa072b03515e19f770ee20ba9a80d6.zip opensim-SC_OLD-f75e418211fa072b03515e19f770ee20ba9a80d6.tar.gz opensim-SC_OLD-f75e418211fa072b03515e19f770ee20ba9a80d6.tar.bz2 opensim-SC_OLD-f75e418211fa072b03515e19f770ee20ba9a80d6.tar.xz |
Fixes to ScriptEngine thread cleanup on destructor
Diffstat (limited to 'OpenSim/Region/ScriptEngine/Common/ScriptEngineBase/MaintenanceThread.cs')
-rw-r--r-- | OpenSim/Region/ScriptEngine/Common/ScriptEngineBase/MaintenanceThread.cs | 9 |
1 files changed, 3 insertions, 6 deletions
diff --git a/OpenSim/Region/ScriptEngine/Common/ScriptEngineBase/MaintenanceThread.cs b/OpenSim/Region/ScriptEngine/Common/ScriptEngineBase/MaintenanceThread.cs index 4776ffe..f959a5b 100644 --- a/OpenSim/Region/ScriptEngine/Common/ScriptEngineBase/MaintenanceThread.cs +++ b/OpenSim/Region/ScriptEngine/Common/ScriptEngineBase/MaintenanceThread.cs | |||
@@ -88,23 +88,20 @@ namespace OpenSim.Region.ScriptEngine.Common.ScriptEngineBase | |||
88 | private void StopMaintenanceThread() | 88 | private void StopMaintenanceThread() |
89 | { | 89 | { |
90 | #if DEBUG | 90 | #if DEBUG |
91 | m_ScriptEngine.Log.Debug("[" + m_ScriptEngine.ScriptEngineName + "]: StopMaintenanceThread() called"); | 91 | //m_ScriptEngine.Log.Debug("[" + m_ScriptEngine.ScriptEngineName + "]: StopMaintenanceThread() called"); |
92 | #endif | 92 | #endif |
93 | PleaseShutdown = true; | 93 | PleaseShutdown = true; |
94 | Thread.Sleep(100); | 94 | Thread.Sleep(100); |
95 | try | 95 | try |
96 | { | 96 | { |
97 | if (MaintenanceThreadThread != null) | 97 | if (MaintenanceThreadThread != null && MaintenanceThreadThread.IsAlive) |
98 | { | ||
99 | if (MaintenanceThreadThread.IsAlive) | ||
100 | { | 98 | { |
101 | MaintenanceThreadThread.Abort(); | 99 | MaintenanceThreadThread.Abort(); |
102 | } | 100 | } |
103 | } | ||
104 | } | 101 | } |
105 | catch (Exception ex) | 102 | catch (Exception ex) |
106 | { | 103 | { |
107 | m_ScriptEngine.Log.Error("[" + m_ScriptEngine.ScriptEngineName + "]: Exception stopping maintenence thread: " + ex.ToString()); | 104 | //m_ScriptEngine.Log.Error("[" + m_ScriptEngine.ScriptEngineName + "]: Exception stopping maintenence thread: " + ex.ToString()); |
108 | } | 105 | } |
109 | } | 106 | } |
110 | 107 | ||