From 3bc8cf65a4e933cfdd0597affc1685c74fb29dba Mon Sep 17 00:00:00 2001 From: Justin Clark-Casey (justincc) Date: Thu, 16 May 2013 17:30:30 +0100 Subject: Where this is not already happening, trigger asychoronous calls to CloseChildAgent() above the LocalSimulationConnector level. This is so that other callers (such as SceneCommunicationService.SendCloseChildAgentConnections() can perform all closes asynchronously without pointlessly firing another thread for local closes). No functional change apart from elimination of unnecessary chaining of new threads. --- .../Region/CoreModules/Framework/EntityTransfer/EntityTransferModule.cs | 1 + .../ServiceConnectorsOut/Simulation/LocalSimulationConnector.cs | 2 +- 2 files changed, 2 insertions(+), 1 deletion(-) (limited to 'OpenSim/Region/CoreModules') diff --git a/OpenSim/Region/CoreModules/Framework/EntityTransfer/EntityTransferModule.cs b/OpenSim/Region/CoreModules/Framework/EntityTransfer/EntityTransferModule.cs index eac0da7..9579449 100644 --- a/OpenSim/Region/CoreModules/Framework/EntityTransfer/EntityTransferModule.cs +++ b/OpenSim/Region/CoreModules/Framework/EntityTransfer/EntityTransferModule.cs @@ -937,6 +937,7 @@ namespace OpenSim.Region.CoreModules.Framework.EntityTransfer EnableChildAgents(sp); // Finally, kill the agent we just created at the destination. + // XXX: Possibly this should be done asynchronously. Scene.SimulationService.CloseAgent(finalDestination, sp.UUID); } diff --git a/OpenSim/Region/CoreModules/ServiceConnectorsOut/Simulation/LocalSimulationConnector.cs b/OpenSim/Region/CoreModules/ServiceConnectorsOut/Simulation/LocalSimulationConnector.cs index a413546..9427961 100644 --- a/OpenSim/Region/CoreModules/ServiceConnectorsOut/Simulation/LocalSimulationConnector.cs +++ b/OpenSim/Region/CoreModules/ServiceConnectorsOut/Simulation/LocalSimulationConnector.cs @@ -317,7 +317,7 @@ namespace OpenSim.Region.CoreModules.ServiceConnectorsOut.Simulation // "[LOCAL SIMULATION CONNECTOR]: Found region {0} {1} to send AgentUpdate", // s.RegionInfo.RegionName, destination.RegionHandle); - Util.FireAndForget(delegate { m_scenes[destination.RegionID].IncomingCloseAgent(id, false); }); + m_scenes[destination.RegionID].IncomingCloseAgent(id, false); return true; } -- cgit v1.1