Add locking around stats record fetch to resolve Mantis 7793.

LSLKeyTest
Robert Adams 2015-12-27 15:05:17 -08:00
parent e2517b51f8
commit 7831d219d7
1 changed files with 21 additions and 18 deletions

View File

@ -262,6 +262,8 @@ namespace OpenSim.Framework.Monitoring
{ {
OSDMap map = new OSDMap(); OSDMap map = new OSDMap();
lock (RegisteredStats)
{
foreach (string catName in RegisteredStats.Keys) foreach (string catName in RegisteredStats.Keys)
{ {
// Do this category if null spec, "all" subcommand or category name matches passed parameter. // Do this category if null spec, "all" subcommand or category name matches passed parameter.
@ -290,6 +292,7 @@ namespace OpenSim.Framework.Monitoring
} }
map.Add(catName, contMap); map.Add(catName, contMap);
} }
}
return map; return map;
} }