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.
avinationmerge
Melanie 2012-09-16 23:41:34 +02:00
parent a79bafaaaf
commit 8dae7928d3
1 changed files with 9 additions and 1 deletions

View File

@ -443,7 +443,15 @@ namespace OpenSim.Server.Handlers.Simulation
// subclasses can override this // subclasses can override this
protected virtual bool CreateAgent(GridRegion destination, AgentCircuitData aCircuit, uint teleportFlags, out string reason) 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;
} }
} }