Merge branch 'moses.metricsPhase2' of git.irl.ucf.edu:/irl/git/opensim into moses.metricsPhase2

fsassets
Glenn Martin 2015-05-18 16:36:06 -04:00
commit 3efcef7d7e
1 changed files with 5 additions and 1 deletions

View File

@ -433,7 +433,11 @@ Asset service request failures: {3}" + Environment.NewLine,
foreach (ProcessThread currentThread in foreach (ProcessThread currentThread in
Process.GetCurrentProcess().Threads) Process.GetCurrentProcess().Threads)
{ {
if (currentThread.ThreadState == ThreadState.Running) // A known issue with the current process .Threads property is
// that it can return null threads, thus don't count those as
// running threads and prevent the program function from failing
if (currentThread != null &&
currentThread.ThreadState == ThreadState.Running)
{ {
numberThreadsRunning++; numberThreadsRunning++;
} }