From e8165a7b51db74ea8d283dbfa34f21bf3d7a7552 Mon Sep 17 00:00:00 2001 From: UbitUmarov Date: Fri, 9 Jun 2017 20:14:56 +0100 Subject: [PATCH] only silent remove threads from watch list if they stopped ( ie still consider aborted etc ) --- OpenSim/Framework/Monitoring/Watchdog.cs | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/OpenSim/Framework/Monitoring/Watchdog.cs b/OpenSim/Framework/Monitoring/Watchdog.cs index 5fb725c79a..9cac451c63 100644 --- a/OpenSim/Framework/Monitoring/Watchdog.cs +++ b/OpenSim/Framework/Monitoring/Watchdog.cs @@ -254,14 +254,12 @@ namespace OpenSim.Framework.Monitoring twi.Cleanup(); m_threads.Remove(threadID); - return true; } else { m_log.WarnFormat( "[WATCHDOG]: Requested to remove thread with ID {0} but this is not being monitored", threadID); - return false; } } @@ -360,7 +358,7 @@ namespace OpenSim.Framework.Monitoring List callbackInfos = null; List threadsToRemove = null; - const ThreadState thgone = ThreadState.Stopped | ThreadState.Aborted | ThreadState.AbortRequested; + const ThreadState thgone = ThreadState.Stopped; lock (m_threads) { @@ -368,7 +366,7 @@ namespace OpenSim.Framework.Monitoring { if(!m_enabled) return; - if(!threadInfo.Thread.IsAlive || (threadInfo.Thread.ThreadState & thgone) != 0) + if((threadInfo.Thread.ThreadState & thgone) != 0) { if(threadsToRemove == null) threadsToRemove = new List();