From 8dae7928d39399c2ac3d6a0dbd9a1362b2e0f68d Mon Sep 17 00:00:00 2001 From: Melanie Date: Sun, 16 Sep 2012 23:41:34 +0200 Subject: Make agent creation at destination asynchronous. Failures here are pretty much guaranteed to be fatal and the few times this would dosconnect an agent are more than made up for by the increased throughput of replying and closing the connection vs. keeping it open during the heavy work. Also causes better feedback to the viewer as the time is now split between Requesting Teleport and Connectiong to Destination. --- OpenSim/Server/Handlers/Simulation/AgentHandlers.cs | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) (limited to 'OpenSim/Server/Handlers') diff --git a/OpenSim/Server/Handlers/Simulation/AgentHandlers.cs b/OpenSim/Server/Handlers/Simulation/AgentHandlers.cs index d772c39..0bd8269 100644 --- a/OpenSim/Server/Handlers/Simulation/AgentHandlers.cs +++ b/OpenSim/Server/Handlers/Simulation/AgentHandlers.cs @@ -443,7 +443,15 @@ namespace OpenSim.Server.Handlers.Simulation // subclasses can override this protected virtual bool CreateAgent(GridRegion destination, AgentCircuitData aCircuit, uint teleportFlags, out string reason) { - return m_SimulationService.CreateAgent(destination, aCircuit, teleportFlags, out reason); + reason = String.Empty; + + Util.FireAndForget(x => + { + string r; + m_SimulationService.CreateAgent(destination, aCircuit, teleportFlags, out r); + }); + + return true; } } -- cgit v1.1