If a returning teleport starts to reuse a downgraded child connection that was a previous root agent, do not close that child agent at the end of the 15 sec teleport timer.

This prevents an issue if the user teleports back to the neighbour simulator of a source before 15 seconds have elapsed.
This more closely emulates observed linden behaviour, though the timeout there is 50 secs and applies to all the pre-teleport agents.
Currently sticks a DoNotClose flag on ScenePresence though this may be temporary as possibly it could be incorporated into the ETM state machine
TeleportWork
Justin Clark-Casey (justincc) 2013-07-26 01:04:16 +01:00
parent 20b989e048
commit 1fabdcc43c
3 changed files with 34 additions and 12 deletions

View File

@ -1054,8 +1054,16 @@ namespace OpenSim.Region.CoreModules.Framework.EntityTransfer
// DECREASING THE WAIT TIME HERE WILL EITHER RESULT IN A VIEWER CRASH OR
// IN THE AVIE BEING PLACED IN INFINITY FOR A COUPLE OF SECONDS.
Thread.Sleep(15000);
if (!sp.DoNotClose)
{
sp.Scene.IncomingCloseAgent(sp.UUID, false);
}
else
{
sp.DoNotClose = false;
}
}
else
// now we have a child agent in this region.
sp.Reset();

View File

@ -3682,7 +3682,9 @@ namespace OpenSim.Region.Framework.Scenes
{
ScenePresence sp = GetScenePresence(agent.AgentID);
if (sp != null && !sp.IsChildAgent)
if (sp != null)
{
if (!sp.IsChildAgent)
{
// We have a zombie from a crashed session.
// Or the same user is trying to be root twice here, won't work.
@ -3696,6 +3698,11 @@ namespace OpenSim.Region.Framework.Scenes
sp = null;
}
else
{
sp.DoNotClose = true;
}
}
// Optimistic: add or update the circuit data with the new agent circuit data and teleport flags.
// We need the circuit data here for some of the subsequent checks. (groups, for example)

View File

@ -717,6 +717,13 @@ namespace OpenSim.Region.Framework.Scenes
}
}
/// <summary>
/// Used by the entity transfer module to signal when the presence should not be closed because a subsequent
/// teleport is reusing the connection.
/// </summary>
/// <remarks>May be refactored or move somewhere else soon.</remarks>
public bool DoNotClose { get; set; }
private float m_speedModifier = 1.0f;
public float SpeedModifier