diff options
author | Justin Clark-Casey (justincc) | 2013-08-15 14:07:57 +0100 |
---|---|---|
committer | Justin Clark-Casey (justincc) | 2013-08-15 14:07:57 +0100 |
commit | 3f8d79024bc760e4f0c5cbca2126ab725c847078 (patch) | |
tree | c9e8bdb7464da618e446298f8556bdebf72bb9ee | |
parent | Do not use the SP.DoNotCloseAfterTeleport flag for child agent connections. (diff) | |
download | opensim-SC_OLD-3f8d79024bc760e4f0c5cbca2126ab725c847078.zip opensim-SC_OLD-3f8d79024bc760e4f0c5cbca2126ab725c847078.tar.gz opensim-SC_OLD-3f8d79024bc760e4f0c5cbca2126ab725c847078.tar.bz2 opensim-SC_OLD-3f8d79024bc760e4f0c5cbca2126ab725c847078.tar.xz |
Rely on the Scene.IncomingCloseAgent() check as to whether the connection should be kept open after teleport-end rather than doing this in the ET Module
This is safer since the close check in IncomingCloseAgent() is done under lock conditions, which prevents a race between ETM and Scene.AddClient()
-rw-r--r-- | OpenSim/Region/CoreModules/Framework/EntityTransfer/EntityTransferModule.cs | 20 | ||||
-rw-r--r-- | OpenSim/Region/Framework/Scenes/Scene.cs | 2 |
2 files changed, 7 insertions, 15 deletions
diff --git a/OpenSim/Region/CoreModules/Framework/EntityTransfer/EntityTransferModule.cs b/OpenSim/Region/CoreModules/Framework/EntityTransfer/EntityTransferModule.cs index 93a089d..5f85eb0 100644 --- a/OpenSim/Region/CoreModules/Framework/EntityTransfer/EntityTransferModule.cs +++ b/OpenSim/Region/CoreModules/Framework/EntityTransfer/EntityTransferModule.cs | |||
@@ -1085,20 +1085,12 @@ namespace OpenSim.Region.CoreModules.Framework.EntityTransfer | |||
1085 | // IN THE AVIE BEING PLACED IN INFINITY FOR A COUPLE OF SECONDS. | 1085 | // IN THE AVIE BEING PLACED IN INFINITY FOR A COUPLE OF SECONDS. |
1086 | Thread.Sleep(15000); | 1086 | Thread.Sleep(15000); |
1087 | 1087 | ||
1088 | if (!sp.DoNotCloseAfterTeleport) | 1088 | // OK, it got this agent. Let's close everything |
1089 | { | 1089 | // If we shouldn't close the agent due to some other region renewing the connection |
1090 | // OK, it got this agent. Let's close everything | 1090 | // then this will be handled in IncomingCloseAgent under lock conditions |
1091 | m_log.DebugFormat("[ENTITY TRANSFER MODULE]: Closing agent {0} in {1}", sp.Name, Scene.Name); | 1091 | m_log.DebugFormat( |
1092 | sp.Scene.IncomingCloseAgent(sp.UUID, false); | 1092 | "[ENTITY TRANSFER MODULE]: Closing agent {0} in {1} after teleport", sp.Name, Scene.Name); |
1093 | } | 1093 | sp.Scene.IncomingCloseAgent(sp.UUID, false); |
1094 | else | ||
1095 | { | ||
1096 | m_log.DebugFormat( | ||
1097 | "[ENTITY TRANSFER MODULE]: Connection for {0} in {1} has been re-established after teleport. Not closing.", | ||
1098 | sp.Name, Scene.Name); | ||
1099 | |||
1100 | sp.DoNotCloseAfterTeleport = false; | ||
1101 | } | ||
1102 | } | 1094 | } |
1103 | else | 1095 | else |
1104 | { | 1096 | { |
diff --git a/OpenSim/Region/Framework/Scenes/Scene.cs b/OpenSim/Region/Framework/Scenes/Scene.cs index 3e5ef10..b58e7c4 100644 --- a/OpenSim/Region/Framework/Scenes/Scene.cs +++ b/OpenSim/Region/Framework/Scenes/Scene.cs | |||
@@ -3725,7 +3725,7 @@ namespace OpenSim.Region.Framework.Scenes | |||
3725 | sp.DoNotCloseAfterTeleport = true; | 3725 | sp.DoNotCloseAfterTeleport = true; |
3726 | 3726 | ||
3727 | m_log.DebugFormat( | 3727 | m_log.DebugFormat( |
3728 | "[SCENE]: Set DoNotCloseAfterTeleport for child scene presence {0} in {1} because this region will attempt previous end-of-teleport close.", | 3728 | "[SCENE]: Set DoNotCloseAfterTeleport for child scene presence {0} in {1} because this region will attempt end-of-teleport close from a previous close.", |
3729 | sp.Name, Name); | 3729 | sp.Name, Name); |
3730 | } | 3730 | } |
3731 | } | 3731 | } |