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.user_profiles
parent
bd31821792
commit
d214e2d0c4
|
@ -3440,8 +3440,8 @@ namespace OpenSim.Region.Framework.Scenes
|
||||||
List<ulong> regions = avatar.KnownRegionHandles;
|
List<ulong> regions = avatar.KnownRegionHandles;
|
||||||
regions.Remove(RegionInfo.RegionHandle);
|
regions.Remove(RegionInfo.RegionHandle);
|
||||||
|
|
||||||
// We must do this asynchronously so that a logout isn't held up where there are many present but unresponsive neighbours.
|
// This ends up being done asynchronously so that a logout isn't held up where there are many present but unresponsive neighbours.
|
||||||
Util.FireAndForget(delegate { m_sceneGridService.SendCloseChildAgentConnections(agentID, regions); });
|
m_sceneGridService.SendCloseChildAgentConnections(agentID, regions);
|
||||||
}
|
}
|
||||||
|
|
||||||
m_eventManager.TriggerClientClosed(agentID, this);
|
m_eventManager.TriggerClientClosed(agentID, this);
|
||||||
|
|
|
@ -222,9 +222,7 @@ namespace OpenSim.Region.Framework.Scenes
|
||||||
public void SendCloseChildAgentConnections(UUID agentID, List<ulong> regionslst)
|
public void SendCloseChildAgentConnections(UUID agentID, List<ulong> regionslst)
|
||||||
{
|
{
|
||||||
foreach (ulong handle in regionslst)
|
foreach (ulong handle in regionslst)
|
||||||
{
|
Util.FireAndForget(delegate { SendCloseChildAgent(agentID, handle); });
|
||||||
SendCloseChildAgent(agentID, handle);
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
public List<GridRegion> RequestNamedRegions(string name, int maxNumber)
|
public List<GridRegion> RequestNamedRegions(string name, int maxNumber)
|
||||||
|
|
|
@ -3135,10 +3135,8 @@ namespace OpenSim.Region.Framework.Scenes
|
||||||
if (byebyeRegions.Count > 0)
|
if (byebyeRegions.Count > 0)
|
||||||
{
|
{
|
||||||
m_log.Debug("[SCENE PRESENCE]: Closing " + byebyeRegions.Count + " child agents");
|
m_log.Debug("[SCENE PRESENCE]: Closing " + byebyeRegions.Count + " child agents");
|
||||||
Util.FireAndForget(delegate
|
|
||||||
{
|
|
||||||
m_scene.SceneGridService.SendCloseChildAgentConnections(ControllingClient.AgentId, byebyeRegions);
|
m_scene.SceneGridService.SendCloseChildAgentConnections(ControllingClient.AgentId, byebyeRegions);
|
||||||
});
|
|
||||||
}
|
}
|
||||||
|
|
||||||
foreach (ulong handle in byebyeRegions)
|
foreach (ulong handle in byebyeRegions)
|
||||||
|
|
Loading…
Reference in New Issue