aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/OpenSim
diff options
context:
space:
mode:
authorUbitUmarov2017-06-09 20:14:56 +0100
committerUbitUmarov2017-06-09 20:14:56 +0100
commite8165a7b51db74ea8d283dbfa34f21bf3d7a7552 (patch)
tree9a4c1a271ae0bbbe3dba756328bc9fcc8d6a0b78 /OpenSim
parent make SendCoarseLocations async, since it is http. Make some actions use thre... (diff)
downloadopensim-SC_OLD-e8165a7b51db74ea8d283dbfa34f21bf3d7a7552.zip
opensim-SC_OLD-e8165a7b51db74ea8d283dbfa34f21bf3d7a7552.tar.gz
opensim-SC_OLD-e8165a7b51db74ea8d283dbfa34f21bf3d7a7552.tar.bz2
opensim-SC_OLD-e8165a7b51db74ea8d283dbfa34f21bf3d7a7552.tar.xz
only silent remove threads from watch list if they stopped ( ie still consider aborted etc )
Diffstat (limited to 'OpenSim')
-rw-r--r--OpenSim/Framework/Monitoring/Watchdog.cs6
1 files changed, 2 insertions, 4 deletions
diff --git a/OpenSim/Framework/Monitoring/Watchdog.cs b/OpenSim/Framework/Monitoring/Watchdog.cs
index 5fb725c..9cac451 100644
--- a/OpenSim/Framework/Monitoring/Watchdog.cs
+++ b/OpenSim/Framework/Monitoring/Watchdog.cs
@@ -254,14 +254,12 @@ namespace OpenSim.Framework.Monitoring
254 254
255 twi.Cleanup(); 255 twi.Cleanup();
256 m_threads.Remove(threadID); 256 m_threads.Remove(threadID);
257
258 return true; 257 return true;
259 } 258 }
260 else 259 else
261 { 260 {
262 m_log.WarnFormat( 261 m_log.WarnFormat(
263 "[WATCHDOG]: Requested to remove thread with ID {0} but this is not being monitored", threadID); 262 "[WATCHDOG]: Requested to remove thread with ID {0} but this is not being monitored", threadID);
264
265 return false; 263 return false;
266 } 264 }
267 } 265 }
@@ -360,7 +358,7 @@ namespace OpenSim.Framework.Monitoring
360 List<ThreadWatchdogInfo> callbackInfos = null; 358 List<ThreadWatchdogInfo> callbackInfos = null;
361 List<ThreadWatchdogInfo> threadsToRemove = null; 359 List<ThreadWatchdogInfo> threadsToRemove = null;
362 360
363 const ThreadState thgone = ThreadState.Stopped | ThreadState.Aborted | ThreadState.AbortRequested; 361 const ThreadState thgone = ThreadState.Stopped;
364 362
365 lock (m_threads) 363 lock (m_threads)
366 { 364 {
@@ -368,7 +366,7 @@ namespace OpenSim.Framework.Monitoring
368 { 366 {
369 if(!m_enabled) 367 if(!m_enabled)
370 return; 368 return;
371 if(!threadInfo.Thread.IsAlive || (threadInfo.Thread.ThreadState & thgone) != 0) 369 if((threadInfo.Thread.ThreadState & thgone) != 0)
372 { 370 {
373 if(threadsToRemove == null) 371 if(threadsToRemove == null)
374 threadsToRemove = new List<ThreadWatchdogInfo>(); 372 threadsToRemove = new List<ThreadWatchdogInfo>();