diff options
Diffstat (limited to 'OpenSim/Framework')
-rwxr-xr-x | OpenSim/Framework/Monitoring/SimExtraStatsCollector.cs | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/OpenSim/Framework/Monitoring/SimExtraStatsCollector.cs b/OpenSim/Framework/Monitoring/SimExtraStatsCollector.cs index 432efdb..83d9e85 100755 --- a/OpenSim/Framework/Monitoring/SimExtraStatsCollector.cs +++ b/OpenSim/Framework/Monitoring/SimExtraStatsCollector.cs | |||
@@ -433,7 +433,11 @@ Asset service request failures: {3}" + Environment.NewLine, | |||
433 | foreach (ProcessThread currentThread in | 433 | foreach (ProcessThread currentThread in |
434 | Process.GetCurrentProcess().Threads) | 434 | Process.GetCurrentProcess().Threads) |
435 | { | 435 | { |
436 | if (currentThread.ThreadState == ThreadState.Running) | 436 | // A known issue with the current process .threads method is |
437 | // that it can return null threads, thus don't count those as | ||
438 | // running threads and prevent the program function from failing | ||
439 | if (currentThread != null && | ||
440 | currentThread.ThreadState == ThreadState.Running) | ||
437 | { | 441 | { |
438 | numberThreadsRunning++; | 442 | numberThreadsRunning++; |
439 | } | 443 | } |