aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/OpenSim
diff options
context:
space:
mode:
Diffstat (limited to 'OpenSim')
-rwxr-xr-xOpenSim/Framework/Monitoring/SimExtraStatsCollector.cs6
1 files changed, 5 insertions, 1 deletions
diff --git a/OpenSim/Framework/Monitoring/SimExtraStatsCollector.cs b/OpenSim/Framework/Monitoring/SimExtraStatsCollector.cs
index 432efdb..e4df7ee 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 property 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 }