From baa65d4a15c0907434bb26f2ac85ad881dd3c3ca Mon Sep 17 00:00:00 2001 From: Dan Lake Date: Tue, 15 Nov 2011 17:09:17 -0800 Subject: [PATCH] In AddNewClient, iterator over copy of entities rather than copying under read lock --- OpenSim/Region/Framework/Scenes/Scene.cs | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/OpenSim/Region/Framework/Scenes/Scene.cs b/OpenSim/Region/Framework/Scenes/Scene.cs index c1cbbd418e..f10789be0a 100644 --- a/OpenSim/Region/Framework/Scenes/Scene.cs +++ b/OpenSim/Region/Framework/Scenes/Scene.cs @@ -2544,11 +2544,12 @@ namespace OpenSim.Region.Framework.Scenes // Send all scene object to the new client Util.FireAndForget(delegate { - Entities.ForEach(delegate(EntityBase e) + EntityBase[] entities = Entities.GetEntities(); + foreach(EntityBase e in entities) { if (e != null && e is SceneObjectGroup) ((SceneObjectGroup)e).SendFullUpdateToClient(client); - }); + } }); }