In AddNewClient, iterator over copy of entities rather than copying under read lock

iar_mods
Dan Lake 2011-11-15 17:09:17 -08:00
parent e21949deaf
commit baa65d4a15
1 changed files with 3 additions and 2 deletions

View File

@ -2544,11 +2544,12 @@ namespace OpenSim.Region.Framework.Scenes
// Send all scene object to the new client // Send all scene object to the new client
Util.FireAndForget(delegate Util.FireAndForget(delegate
{ {
Entities.ForEach(delegate(EntityBase e) EntityBase[] entities = Entities.GetEntities();
foreach(EntityBase e in entities)
{ {
if (e != null && e is SceneObjectGroup) if (e != null && e is SceneObjectGroup)
((SceneObjectGroup)e).SendFullUpdateToClient(client); ((SceneObjectGroup)e).SendFullUpdateToClient(client);
}); }
}); });
} }