diff options
author | Justin Clark-Casey (justincc) | 2014-01-16 23:31:50 +0000 |
---|---|---|
committer | Justin Clark-Casey (justincc) | 2014-01-17 00:11:52 +0000 |
commit | d88c9756a778bda8b71cc772746df962825968e4 (patch) | |
tree | 0649095d48a73338dd51fa57f1e6a74362a94cce /OpenSim/Region/Framework/Scenes | |
parent | Prevent duplicate invocations or race dontision in SP.CompleteMovement() (diff) | |
download | opensim-SC_OLD-d88c9756a778bda8b71cc772746df962825968e4.zip opensim-SC_OLD-d88c9756a778bda8b71cc772746df962825968e4.tar.gz opensim-SC_OLD-d88c9756a778bda8b71cc772746df962825968e4.tar.bz2 opensim-SC_OLD-d88c9756a778bda8b71cc772746df962825968e4.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 'OpenSim/Region/Framework/Scenes')
-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 d7511d3..c2554d8 100644 --- a/OpenSim/Region/Framework/Scenes/ScenePresence.cs +++ b/OpenSim/Region/Framework/Scenes/ScenePresence.cs | |||
@@ -932,10 +932,12 @@ namespace OpenSim.Region.Framework.Scenes | |||
932 | //m_log.DebugFormat("[SCENE]: known regions in {0}: {1}", Scene.RegionInfo.RegionName, KnownChildRegionHandles.Count); | 932 | //m_log.DebugFormat("[SCENE]: known regions in {0}: {1}", Scene.RegionInfo.RegionName, KnownChildRegionHandles.Count); |
933 | 933 | ||
934 | lock (m_completeMovementLock) | 934 | lock (m_completeMovementLock) |
935 | { | ||
935 | if (!IsChildAgent) | 936 | if (!IsChildAgent) |
936 | return false; | 937 | return false; |
937 | 938 | ||
938 | IsChildAgent = false; | 939 | IsChildAgent = false; |
940 | } | ||
939 | 941 | ||
940 | // Must reset this here so that a teleport to a region next to an existing region does not keep the flag | 942 | // Must reset this here so that a teleport to a region next to an existing region does not keep the flag |
941 | // set and prevent the close of the connection on a subsequent re-teleport. | 943 | // set and prevent the close of the connection on a subsequent re-teleport. |