diff --git a/OpenSim/Region/CoreModules/Framework/EntityTransfer/EntityTransferModule.cs b/OpenSim/Region/CoreModules/Framework/EntityTransfer/EntityTransferModule.cs index e52a19579b..a8944605ca 100644 --- a/OpenSim/Region/CoreModules/Framework/EntityTransfer/EntityTransferModule.cs +++ b/OpenSim/Region/CoreModules/Framework/EntityTransfer/EntityTransferModule.cs @@ -314,6 +314,9 @@ namespace OpenSim.Region.CoreModules.Framework.EntityTransfer return; } + if (IsInTransit(sp.UUID)) // Avie is already on the way. Caller shouldn't do this. + return; + m_log.DebugFormat( "[ENTITY TRANSFER MODULE]: Request Teleport to {0} ({1}) {2}/{3}", reg.ServerURI, finalDestination.ServerURI, finalDestination.RegionName, position); @@ -1870,6 +1873,16 @@ namespace OpenSim.Region.CoreModules.Framework.EntityTransfer } } + protected bool IsInTransit(UUID id) + { + lock (m_agentsInTransit) + { + if (m_agentsInTransit.Contains(id)) + return true; + } + return false; + } + protected bool ResetFromTransit(UUID id) { lock (m_agentsInTransit)