diff options
Diffstat (limited to 'OpenSim/Framework/Monitoring/Watchdog.cs')
-rw-r--r-- | OpenSim/Framework/Monitoring/Watchdog.cs | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/OpenSim/Framework/Monitoring/Watchdog.cs b/OpenSim/Framework/Monitoring/Watchdog.cs index a644fa5..4485a9c 100644 --- a/OpenSim/Framework/Monitoring/Watchdog.cs +++ b/OpenSim/Framework/Monitoring/Watchdog.cs | |||
@@ -335,7 +335,9 @@ namespace OpenSim.Framework.Monitoring | |||
335 | 335 | ||
336 | lock (m_threads) | 336 | lock (m_threads) |
337 | { | 337 | { |
338 | foreach (ThreadWatchdogInfo threadInfo in m_threads.Values) | 338 | // get a copy since we may change m_threads |
339 | List<ThreadWatchdogInfo> threadsInfo = m_threads.Values.ToList(); | ||
340 | foreach (ThreadWatchdogInfo threadInfo in threadsInfo) | ||
339 | { | 341 | { |
340 | if (threadInfo.Thread.ThreadState == ThreadState.Stopped) | 342 | if (threadInfo.Thread.ThreadState == ThreadState.Stopped) |
341 | { | 343 | { |
@@ -377,4 +379,4 @@ namespace OpenSim.Framework.Monitoring | |||
377 | m_watchdogTimer.Start(); | 379 | m_watchdogTimer.Start(); |
378 | } | 380 | } |
379 | } | 381 | } |
380 | } \ No newline at end of file | 382 | } |