aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/OpenSim/Framework
diff options
context:
space:
mode:
authorSteven Zielinski2015-05-01 17:07:19 -0400
committerSteven Zielinski2015-05-01 17:09:18 -0400
commitc4a3c93097c9a1c1b93f5b86dfc0f17062e42c30 (patch)
treef0c50361d1f7f2b93fd7fe43e8209e26c09838e4 /OpenSim/Framework
parentUpdated phase 2 to have the changes originally done in phase 1 for the defaul... (diff)
downloadopensim-SC_OLD-c4a3c93097c9a1c1b93f5b86dfc0f17062e42c30.zip
opensim-SC_OLD-c4a3c93097c9a1c1b93f5b86dfc0f17062e42c30.tar.gz
opensim-SC_OLD-c4a3c93097c9a1c1b93f5b86dfc0f17062e42c30.tar.bz2
opensim-SC_OLD-c4a3c93097c9a1c1b93f5b86dfc0f17062e42c30.tar.xz
Fixed a bug that would cause the sim extra stats reporter to fail in reporting stats. The bug was caused by the current process threads which can return null references.
Test Plan: Tested on windows using opensim standalone and the json stats. Reviewers: rlouden, kboswell, clattin, martin, ssirigam Differential Revision: http://cr.irl.ucf.edu/D277
Diffstat (limited to 'OpenSim/Framework')
-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..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 }