aboutsummaryrefslogtreecommitdiffstatshomepage
diff options
context:
space:
mode:
authorJustin Clark-Casey (justincc)2013-06-07 19:13:24 +0100
committerJustin Clark-Casey (justincc)2013-06-07 19:13:24 +0100
commitf2a4d9b99cfefac622cc3d499cbdc757c4bff527 (patch)
treef72a4df0d3c2f3542240c04233cca277dfa1f9dc
parentMerge branch 'master' of ssh://opensimulator.org/var/git/opensim (diff)
downloadopensim-SC_OLD-f2a4d9b99cfefac622cc3d499cbdc757c4bff527.zip
opensim-SC_OLD-f2a4d9b99cfefac622cc3d499cbdc757c4bff527.tar.gz
opensim-SC_OLD-f2a4d9b99cfefac622cc3d499cbdc757c4bff527.tar.bz2
opensim-SC_OLD-f2a4d9b99cfefac622cc3d499cbdc757c4bff527.tar.xz
Fix regression where multiple close agents could be sent to the wrong neighbour region on root agent close.
This was introduced in git master d214e2d0 (Thu May 16 17:12:02 2013) Caught out by the fact that value types used in iterators act like references and this was dispatched asynchronously. Should address http://opensimulator.org/mantis/view.php?id=6658
-rw-r--r--OpenSim/Region/Framework/Scenes/SceneCommunicationService.cs7
1 files changed, 6 insertions, 1 deletions
diff --git a/OpenSim/Region/Framework/Scenes/SceneCommunicationService.cs b/OpenSim/Region/Framework/Scenes/SceneCommunicationService.cs
index 8c84c98..8238e23 100644
--- a/OpenSim/Region/Framework/Scenes/SceneCommunicationService.cs
+++ b/OpenSim/Region/Framework/Scenes/SceneCommunicationService.cs
@@ -222,7 +222,12 @@ namespace OpenSim.Region.Framework.Scenes
222 public void SendCloseChildAgentConnections(UUID agentID, List<ulong> regionslst) 222 public void SendCloseChildAgentConnections(UUID agentID, List<ulong> regionslst)
223 { 223 {
224 foreach (ulong handle in regionslst) 224 foreach (ulong handle in regionslst)
225 Util.FireAndForget(delegate { SendCloseChildAgent(agentID, handle); }); 225 {
226 // We must take a copy here since handle is acts like a reference when used in an iterator.
227 // This leads to race conditions if directly passed to SendCloseChildAgent with more than one neighbour region.
228 ulong handleCopy = handle;
229 Util.FireAndForget((o) => { SendCloseChildAgent(agentID, handleCopy); });
230 }
226 } 231 }
227 232
228 public List<GridRegion> RequestNamedRegions(string name, int maxNumber) 233 public List<GridRegion> RequestNamedRegions(string name, int maxNumber)