aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/OpenSim/Region/CoreModules/Framework/EntityTransfer/EntityTransferModule.cs
diff options
context:
space:
mode:
authorJustin Clark-Casey (justincc)2012-05-03 22:30:36 +0100
committerJustin Clark-Casey (justincc)2012-05-03 22:30:36 +0100
commitfcd5b0817be93ccbb9897b424f70c5081a445e9f (patch)
treee941c30740e283bbf7d2e2a648b7f804a99d4729 /OpenSim/Region/CoreModules/Framework/EntityTransfer/EntityTransferModule.cs
parentRemove the somewhat misleading logging of the string length of some unknown r... (diff)
downloadopensim-SC_OLD-fcd5b0817be93ccbb9897b424f70c5081a445e9f.zip
opensim-SC_OLD-fcd5b0817be93ccbb9897b424f70c5081a445e9f.tar.gz
opensim-SC_OLD-fcd5b0817be93ccbb9897b424f70c5081a445e9f.tar.bz2
opensim-SC_OLD-fcd5b0817be93ccbb9897b424f70c5081a445e9f.tar.xz
Reinsert a 2000ms delay before closing a no longer required agent on the source region after teleport to resolve Imprudence teleport problems.
Viewers 1 and 3 are fine with doing this immediately. However, Imprudence has a small delay (<200ms, >500ms) after receiving the AgentCompleteMovement reply packet on the destination region before regarding that region as the currnet region. If Imprudence receives a DisableSimulator in this period, it quits. We are not restoring the full 5000ms delay since this brings back a bug where teleports permanently fail if an avatar tries to teleport back too quickly. This commit also sends the AgentCompleteMovement packet to the client before telling the source region to release its old agent, in order to further cut down any possibility of the DisableSimulator being recieved before the AgentMovementComplete.
Diffstat (limited to 'OpenSim/Region/CoreModules/Framework/EntityTransfer/EntityTransferModule.cs')
-rw-r--r--OpenSim/Region/CoreModules/Framework/EntityTransfer/EntityTransferModule.cs9
1 files changed, 7 insertions, 2 deletions
diff --git a/OpenSim/Region/CoreModules/Framework/EntityTransfer/EntityTransferModule.cs b/OpenSim/Region/CoreModules/Framework/EntityTransfer/EntityTransferModule.cs
index e47c339..cd588e5 100644
--- a/OpenSim/Region/CoreModules/Framework/EntityTransfer/EntityTransferModule.cs
+++ b/OpenSim/Region/CoreModules/Framework/EntityTransfer/EntityTransferModule.cs
@@ -30,7 +30,6 @@ using System.Collections.Generic;
30using System.Net; 30using System.Net;
31using System.Reflection; 31using System.Reflection;
32using System.Threading; 32using System.Threading;
33
34using OpenSim.Framework; 33using OpenSim.Framework;
35using OpenSim.Framework.Capabilities; 34using OpenSim.Framework.Capabilities;
36using OpenSim.Framework.Client; 35using OpenSim.Framework.Client;
@@ -595,7 +594,13 @@ namespace OpenSim.Region.CoreModules.Framework.EntityTransfer
595 594
596 if (NeedsClosing(sp.DrawDistance, oldRegionX, newRegionX, oldRegionY, newRegionY, reg)) 595 if (NeedsClosing(sp.DrawDistance, oldRegionX, newRegionX, oldRegionY, newRegionY, reg))
597 { 596 {
598// Thread.Sleep(5000); 597 // We need to delay here because Imprudence viewers, unlike v1 or v3, have a short (<200ms, <500ms) delay before
598 // they regard the new region as the current region after receiving the AgentMovementComplete
599 // response. If close is sent before then, it will cause the viewer to quit instead.
600 // However, if this delay is longer, then a viewer can teleport back to this region and experience
601 // a failure because the old ScenePresence has not yet been cleaned up.
602 Thread.Sleep(2000);
603
599 sp.Close(); 604 sp.Close();
600 sp.Scene.IncomingCloseAgent(sp.UUID); 605 sp.Scene.IncomingCloseAgent(sp.UUID);
601 } 606 }