diff options
author | Justin Clark-Casey (justincc) | 2013-03-21 00:46:08 +0000 |
---|---|---|
committer | Justin Clark-Casey (justincc) | 2013-03-21 00:46:08 +0000 |
commit | 46c833810ccd9dd0c3273803e208dc85bb0860a9 (patch) | |
tree | b30743cd471a706fdfd240747194607dd8f13a0c /OpenSim/Region/CoreModules/Framework | |
parent | minor: disable logging on regression TestCrossOnSameSimulator() that I accide... (diff) | |
download | opensim-SC_OLD-46c833810ccd9dd0c3273803e208dc85bb0860a9.zip opensim-SC_OLD-46c833810ccd9dd0c3273803e208dc85bb0860a9.tar.gz opensim-SC_OLD-46c833810ccd9dd0c3273803e208dc85bb0860a9.tar.bz2 opensim-SC_OLD-46c833810ccd9dd0c3273803e208dc85bb0860a9.tar.xz |
On a teleport, lock m_agentsInTransit whilst we grab the value to check for completion just to be sure we're not using a thread cached version.
Diffstat (limited to 'OpenSim/Region/CoreModules/Framework')
-rw-r--r-- | OpenSim/Region/CoreModules/Framework/EntityTransfer/EntityTransferStateMachine.cs | 9 |
1 files changed, 8 insertions, 1 deletions
diff --git a/OpenSim/Region/CoreModules/Framework/EntityTransfer/EntityTransferStateMachine.cs b/OpenSim/Region/CoreModules/Framework/EntityTransfer/EntityTransferStateMachine.cs index 24d81d9..7314727 100644 --- a/OpenSim/Region/CoreModules/Framework/EntityTransfer/EntityTransferStateMachine.cs +++ b/OpenSim/Region/CoreModules/Framework/EntityTransfer/EntityTransferStateMachine.cs | |||
@@ -292,8 +292,15 @@ namespace OpenSim.Region.CoreModules.Framework.EntityTransfer | |||
292 | 292 | ||
293 | // There should be no race condition here since no other code should be removing the agent transfer or | 293 | // There should be no race condition here since no other code should be removing the agent transfer or |
294 | // changing the state to another other than Transferring => ReceivedAtDestination. | 294 | // changing the state to another other than Transferring => ReceivedAtDestination. |
295 | while (m_agentsInTransit[id] != AgentTransferState.ReceivedAtDestination && count-- > 0) | 295 | |
296 | while (count-- > 0) | ||
296 | { | 297 | { |
298 | lock (m_agentsInTransit) | ||
299 | { | ||
300 | if (m_agentsInTransit[id] == AgentTransferState.ReceivedAtDestination) | ||
301 | break; | ||
302 | } | ||
303 | |||
297 | // m_log.Debug(" >>> Waiting... " + count); | 304 | // m_log.Debug(" >>> Waiting... " + count); |
298 | Thread.Sleep(100); | 305 | Thread.Sleep(100); |
299 | } | 306 | } |