From bd31821792a940709ff1355a91b9b60302cc1a17 Mon Sep 17 00:00:00 2001 From: "Justin Clark-Casey (justincc)" Date: Thu, 16 May 2013 16:37:21 +0100 Subject: [PATCH] On logout, send close child agent requests to neighbours asynchronously, so user is not prevented from relogging if many neighbours are present but not responsive. The symptom here is that previous user connections are still present but are labelled active == false --- OpenSim/Region/Framework/Scenes/Scene.cs | 9 +++------ 1 file changed, 3 insertions(+), 6 deletions(-) diff --git a/OpenSim/Region/Framework/Scenes/Scene.cs b/OpenSim/Region/Framework/Scenes/Scene.cs index 6bbcbd749e..50bea6fd70 100644 --- a/OpenSim/Region/Framework/Scenes/Scene.cs +++ b/OpenSim/Region/Framework/Scenes/Scene.cs @@ -3435,16 +3435,13 @@ namespace OpenSim.Region.Framework.Scenes if (closeChildAgents && CapsModule != null) CapsModule.RemoveCaps(agentID); -// // REFACTORING PROBLEM -- well not really a problem, but just to point out that whatever -// // this method is doing is HORRIBLE!!! - // Commented pending deletion since this method no longer appears to do anything at all -// avatar.Scene.NeedSceneCacheClear(avatar.UUID); - if (closeChildAgents && !isChildAgent) { List regions = avatar.KnownRegionHandles; regions.Remove(RegionInfo.RegionHandle); - m_sceneGridService.SendCloseChildAgentConnections(agentID, regions); + + // We must do this 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_eventManager.TriggerClientClosed(agentID, this);