aboutsummaryrefslogtreecommitdiffstatshomepage
diff options
context:
space:
mode:
-rw-r--r--OpenSim/Framework/Monitoring/Watchdog.cs24
-rw-r--r--OpenSim/Framework/Monitoring/WorkManager.cs1
-rw-r--r--OpenSim/Framework/Servers/BaseOpenSimServer.cs3
-rw-r--r--OpenSim/Region/ScriptEngine/Shared/Api/Implementation/AsyncCommandManager.cs1
-rwxr-xr-xOpenSim/Region/ScriptEngine/XEngine/XEngine.cs1
-rw-r--r--OpenSim/Server/Base/ServicesServerBase.cs2
6 files changed, 30 insertions, 2 deletions
diff --git a/OpenSim/Framework/Monitoring/Watchdog.cs b/OpenSim/Framework/Monitoring/Watchdog.cs
index 9cc61ee..8a4894e 100644
--- a/OpenSim/Framework/Monitoring/Watchdog.cs
+++ b/OpenSim/Framework/Monitoring/Watchdog.cs
@@ -180,6 +180,30 @@ namespace OpenSim.Framework.Monitoring
180 m_watchdogTimer.Elapsed += WatchdogTimerElapsed; 180 m_watchdogTimer.Elapsed += WatchdogTimerElapsed;
181 } 181 }
182 182
183 public static void Stop()
184 {
185 if(m_threads == null)
186 return;
187
188 lock(m_threads)
189 {
190 m_enabled = false;
191 if(m_watchdogTimer != null)
192 {
193 m_watchdogTimer.Dispose();
194 m_watchdogTimer = null;
195 }
196
197 foreach(ThreadWatchdogInfo twi in m_threads.Values)
198 {
199 Thread t = twi.Thread;
200 if(t.IsAlive)
201 t.Abort();
202 }
203 m_threads.Clear();
204 }
205 }
206
183 /// <summary> 207 /// <summary>
184 /// Add a thread to the watchdog tracker. 208 /// Add a thread to the watchdog tracker.
185 /// </summary> 209 /// </summary>
diff --git a/OpenSim/Framework/Monitoring/WorkManager.cs b/OpenSim/Framework/Monitoring/WorkManager.cs
index a3e0390..9d52f71 100644
--- a/OpenSim/Framework/Monitoring/WorkManager.cs
+++ b/OpenSim/Framework/Monitoring/WorkManager.cs
@@ -85,6 +85,7 @@ namespace OpenSim.Framework.Monitoring
85 public static void Stop() 85 public static void Stop()
86 { 86 {
87 JobEngine.Stop(); 87 JobEngine.Stop();
88 Watchdog.Stop();
88 } 89 }
89 90
90 /// <summary> 91 /// <summary>
diff --git a/OpenSim/Framework/Servers/BaseOpenSimServer.cs b/OpenSim/Framework/Servers/BaseOpenSimServer.cs
index bc68681..81dd357 100644
--- a/OpenSim/Framework/Servers/BaseOpenSimServer.cs
+++ b/OpenSim/Framework/Servers/BaseOpenSimServer.cs
@@ -119,9 +119,10 @@ namespace OpenSim.Framework.Servers
119 119
120 Thread.Sleep(1000); 120 Thread.Sleep(1000);
121 RemovePIDFile(); 121 RemovePIDFile();
122
122 m_log.Info("[SHUTDOWN]: Shutdown processing on main thread complete. Exiting..."); 123 m_log.Info("[SHUTDOWN]: Shutdown processing on main thread complete. Exiting...");
123 124
124 if (!SuppressExit) 125 if (!SuppressExit)
125 Environment.Exit(0); 126 Environment.Exit(0);
126 } 127 }
127 128
diff --git a/OpenSim/Region/ScriptEngine/Shared/Api/Implementation/AsyncCommandManager.cs b/OpenSim/Region/ScriptEngine/Shared/Api/Implementation/AsyncCommandManager.cs
index 5f57f39..1688aa6 100644
--- a/OpenSim/Region/ScriptEngine/Shared/Api/Implementation/AsyncCommandManager.cs
+++ b/OpenSim/Region/ScriptEngine/Shared/Api/Implementation/AsyncCommandManager.cs
@@ -231,6 +231,7 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api
231 231
232 Watchdog.UpdateThread(); 232 Watchdog.UpdateThread();
233 } 233 }
234 catch ( System.Threading.ThreadAbortException) { }
234 catch (Exception e) 235 catch (Exception e)
235 { 236 {
236 m_log.Error("[ASYNC COMMAND MANAGER]: Exception in command handler pass: ", e); 237 m_log.Error("[ASYNC COMMAND MANAGER]: Exception in command handler pass: ", e);
diff --git a/OpenSim/Region/ScriptEngine/XEngine/XEngine.cs b/OpenSim/Region/ScriptEngine/XEngine/XEngine.cs
index 2e39033..c1abba2 100755
--- a/OpenSim/Region/ScriptEngine/XEngine/XEngine.cs
+++ b/OpenSim/Region/ScriptEngine/XEngine/XEngine.cs
@@ -1079,6 +1079,7 @@ namespace OpenSim.Region.ScriptEngine.XEngine
1079 "[XEngine]: Started {0} scripts in {1}", scriptsStarted, m_Scene.Name); 1079 "[XEngine]: Started {0} scripts in {1}", scriptsStarted, m_Scene.Name);
1080 } 1080 }
1081 } 1081 }
1082 catch (System.Threading.ThreadAbortException) { }
1082 catch (Exception e) 1083 catch (Exception e)
1083 { 1084 {
1084 m_log.Error( 1085 m_log.Error(
diff --git a/OpenSim/Server/Base/ServicesServerBase.cs b/OpenSim/Server/Base/ServicesServerBase.cs
index 2185727..176e876 100644
--- a/OpenSim/Server/Base/ServicesServerBase.cs
+++ b/OpenSim/Server/Base/ServicesServerBase.cs
@@ -252,7 +252,7 @@ namespace OpenSim.Server.Base
252 252
253 MemoryWatchdog.Enabled = false; 253 MemoryWatchdog.Enabled = false;
254 Watchdog.Enabled = false; 254 Watchdog.Enabled = false;
255 255 WorkManager.Stop();
256 RemovePIDFile(); 256 RemovePIDFile();
257 257
258 return 0; 258 return 0;