diff options
author | Justin Clark-Casey (justincc) | 2014-01-16 23:31:50 +0000 |
---|---|---|
committer | Justin Clark-Casey (justincc) | 2014-01-16 23:31:50 +0000 |
commit | 3bc669ffc7638b56d5ab5aac038c33106ba9a95b (patch) | |
tree | 761773bd1c099724216f9135a17b52961661bfb2 /OpenSim | |
parent | Prevent duplicate invocations or race dontision in SP.CompleteMovement() (diff) | |
download | opensim-SC-3bc669ffc7638b56d5ab5aac038c33106ba9a95b.zip opensim-SC-3bc669ffc7638b56d5ab5aac038c33106ba9a95b.tar.gz opensim-SC-3bc669ffc7638b56d5ab5aac038c33106ba9a95b.tar.bz2 opensim-SC-3bc669ffc7638b56d5ab5aac038c33106ba9a95b.tar.xz |
Actually put IsChildAgent = true inside the lock, otherwise there is still a small window for race conditions on duplicate CompleteMovement calls
Diffstat (limited to '')
-rw-r--r-- | OpenSim/Region/Framework/Scenes/ScenePresence.cs | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/OpenSim/Region/Framework/Scenes/ScenePresence.cs b/OpenSim/Region/Framework/Scenes/ScenePresence.cs index 63cca56..3290da1 100644 --- a/OpenSim/Region/Framework/Scenes/ScenePresence.cs +++ b/OpenSim/Region/Framework/Scenes/ScenePresence.cs | |||
@@ -933,10 +933,12 @@ namespace OpenSim.Region.Framework.Scenes | |||
933 | //m_log.DebugFormat("[SCENE]: known regions in {0}: {1}", Scene.RegionInfo.RegionName, KnownChildRegionHandles.Count); | 933 | //m_log.DebugFormat("[SCENE]: known regions in {0}: {1}", Scene.RegionInfo.RegionName, KnownChildRegionHandles.Count); |
934 | 934 | ||
935 | lock (m_completeMovementLock) | 935 | lock (m_completeMovementLock) |
936 | { | ||
936 | if (!IsChildAgent) | 937 | if (!IsChildAgent) |
937 | return false; | 938 | return false; |
938 | 939 | ||
939 | IsChildAgent = false; | 940 | IsChildAgent = false; |
941 | } | ||
940 | 942 | ||
941 | // Must reset this here so that a teleport to a region next to an existing region does not keep the flag | 943 | // Must reset this here so that a teleport to a region next to an existing region does not keep the flag |
942 | // set and prevent the close of the connection on a subsequent re-teleport. | 944 | // set and prevent the close of the connection on a subsequent re-teleport. |