diff options
author | UbitUmarov | 2015-09-05 21:23:22 +0100 |
---|---|---|
committer | UbitUmarov | 2015-09-05 21:23:22 +0100 |
commit | 4b1ecc90fcb1e577d1f02f40fac1e53c66c63496 (patch) | |
tree | 81eafcc8f279af84ea8246ca4b65dd92a7aa38dc /OpenSim/Framework/Monitoring | |
parent | a few changes to stats. Array order coerent on users. give up on moses stats ... (diff) | |
download | opensim-SC-4b1ecc90fcb1e577d1f02f40fac1e53c66c63496.zip opensim-SC-4b1ecc90fcb1e577d1f02f40fac1e53c66c63496.tar.gz opensim-SC-4b1ecc90fcb1e577d1f02f40fac1e53c66c63496.tar.bz2 opensim-SC-4b1ecc90fcb1e577d1f02f40fac1e53c66c63496.tar.xz |
fix modifing m_threads on a foreach scanning it
Diffstat (limited to 'OpenSim/Framework/Monitoring')
-rw-r--r-- | OpenSim/Framework/Monitoring/Watchdog.cs | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/OpenSim/Framework/Monitoring/Watchdog.cs b/OpenSim/Framework/Monitoring/Watchdog.cs index 0cab427..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 | { |