aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/OpenSim/Region/Framework/Scenes
diff options
context:
space:
mode:
authorJustin Clark-Casey (justincc)2013-05-16 17:12:02 +0100
committerJustin Clark-Casey (justincc)2013-05-16 17:12:02 +0100
commitd214e2d0c4b8e1ea5e0d69e2ba94cd668be610bd (patch)
tree046555d177672b30b903716662c32f577eea7c80 /OpenSim/Region/Framework/Scenes
parentOn logout, send close child agent requests to neighbours asynchronously, so u... (diff)
downloadopensim-SC_OLD-d214e2d0c4b8e1ea5e0d69e2ba94cd668be610bd.zip
opensim-SC_OLD-d214e2d0c4b8e1ea5e0d69e2ba94cd668be610bd.tar.gz
opensim-SC_OLD-d214e2d0c4b8e1ea5e0d69e2ba94cd668be610bd.tar.bz2
opensim-SC_OLD-d214e2d0c4b8e1ea5e0d69e2ba94cd668be610bd.tar.xz
On closing child agents, send separate asynchronous requests to each neighbour rather than sending all closes concurrently on a separate thread.
This is to reduce race conditions where neighbours may be responding erratically, thus mixing up create and close agent requests in time. This mirrors OpenSimulator behaviour on enabling child agents where each region is contacted separately.
Diffstat (limited to 'OpenSim/Region/Framework/Scenes')
-rw-r--r--OpenSim/Region/Framework/Scenes/Scene.cs4
-rw-r--r--OpenSim/Region/Framework/Scenes/SceneCommunicationService.cs4
-rw-r--r--OpenSim/Region/Framework/Scenes/ScenePresence.cs6
3 files changed, 5 insertions, 9 deletions
diff --git a/OpenSim/Region/Framework/Scenes/Scene.cs b/OpenSim/Region/Framework/Scenes/Scene.cs
index 50bea6f..8fe9b66 100644
--- a/OpenSim/Region/Framework/Scenes/Scene.cs
+++ b/OpenSim/Region/Framework/Scenes/Scene.cs
@@ -3440,8 +3440,8 @@ namespace OpenSim.Region.Framework.Scenes
3440 List<ulong> regions = avatar.KnownRegionHandles; 3440 List<ulong> regions = avatar.KnownRegionHandles;
3441 regions.Remove(RegionInfo.RegionHandle); 3441 regions.Remove(RegionInfo.RegionHandle);
3442 3442
3443 // We must do this asynchronously so that a logout isn't held up where there are many present but unresponsive neighbours. 3443 // This ends up being done asynchronously so that a logout isn't held up where there are many present but unresponsive neighbours.
3444 Util.FireAndForget(delegate { m_sceneGridService.SendCloseChildAgentConnections(agentID, regions); }); 3444 m_sceneGridService.SendCloseChildAgentConnections(agentID, regions);
3445 } 3445 }
3446 3446
3447 m_eventManager.TriggerClientClosed(agentID, this); 3447 m_eventManager.TriggerClientClosed(agentID, this);
diff --git a/OpenSim/Region/Framework/Scenes/SceneCommunicationService.cs b/OpenSim/Region/Framework/Scenes/SceneCommunicationService.cs
index 305f8a4..8c84c98 100644
--- a/OpenSim/Region/Framework/Scenes/SceneCommunicationService.cs
+++ b/OpenSim/Region/Framework/Scenes/SceneCommunicationService.cs
@@ -222,9 +222,7 @@ 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 { 225 Util.FireAndForget(delegate { SendCloseChildAgent(agentID, handle); });
226 SendCloseChildAgent(agentID, handle);
227 }
228 } 226 }
229 227
230 public List<GridRegion> RequestNamedRegions(string name, int maxNumber) 228 public List<GridRegion> RequestNamedRegions(string name, int maxNumber)
diff --git a/OpenSim/Region/Framework/Scenes/ScenePresence.cs b/OpenSim/Region/Framework/Scenes/ScenePresence.cs
index 2a265db..9e9089b 100644
--- a/OpenSim/Region/Framework/Scenes/ScenePresence.cs
+++ b/OpenSim/Region/Framework/Scenes/ScenePresence.cs
@@ -3135,10 +3135,8 @@ namespace OpenSim.Region.Framework.Scenes
3135 if (byebyeRegions.Count > 0) 3135 if (byebyeRegions.Count > 0)
3136 { 3136 {
3137 m_log.Debug("[SCENE PRESENCE]: Closing " + byebyeRegions.Count + " child agents"); 3137 m_log.Debug("[SCENE PRESENCE]: Closing " + byebyeRegions.Count + " child agents");
3138 Util.FireAndForget(delegate 3138
3139 { 3139 m_scene.SceneGridService.SendCloseChildAgentConnections(ControllingClient.AgentId, byebyeRegions);
3140 m_scene.SceneGridService.SendCloseChildAgentConnections(ControllingClient.AgentId, byebyeRegions);
3141 });
3142 } 3140 }
3143 3141
3144 foreach (ulong handle in byebyeRegions) 3142 foreach (ulong handle in byebyeRegions)