aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/OpenSim/Region/CoreModules/Avatar
diff options
context:
space:
mode:
authorJustin Clark-Casey (justincc)2011-12-19 19:08:24 +0000
committerJustin Clark-Casey (justincc)2011-12-19 19:08:24 +0000
commite8fbeeba5f2c02bf89ade1d8c0fa135d065096e7 (patch)
tree420f05dd42664cf3debc6aed7e7d1224774c7820 /OpenSim/Region/CoreModules/Avatar
parentMerge branch 'master' of ssh://opensimulator.org/var/git/opensim (diff)
downloadopensim-SC-e8fbeeba5f2c02bf89ade1d8c0fa135d065096e7.zip
opensim-SC-e8fbeeba5f2c02bf89ade1d8c0fa135d065096e7.tar.gz
opensim-SC-e8fbeeba5f2c02bf89ade1d8c0fa135d065096e7.tar.bz2
opensim-SC-e8fbeeba5f2c02bf89ade1d8c0fa135d065096e7.tar.xz
Fix race condition where the appearance update timer could be stopped just after another thread had started it on QueueAppearanceSave() or *Send()
However, the window for this race is very small, and the next queued appearance save or send would restart the timer anyway.
Diffstat (limited to 'OpenSim/Region/CoreModules/Avatar')
-rw-r--r--OpenSim/Region/CoreModules/Avatar/AvatarFactory/AvatarFactoryModule.cs9
1 files changed, 6 insertions, 3 deletions
diff --git a/OpenSim/Region/CoreModules/Avatar/AvatarFactory/AvatarFactoryModule.cs b/OpenSim/Region/CoreModules/Avatar/AvatarFactory/AvatarFactoryModule.cs
index f1a81ae..e8aee3e 100644
--- a/OpenSim/Region/CoreModules/Avatar/AvatarFactory/AvatarFactoryModule.cs
+++ b/OpenSim/Region/CoreModules/Avatar/AvatarFactory/AvatarFactoryModule.cs
@@ -417,10 +417,13 @@ namespace OpenSim.Region.CoreModules.Avatar.AvatarFactory
417 m_savequeue.Remove(avatarID); 417 m_savequeue.Remove(avatarID);
418 } 418 }
419 } 419 }
420 }
421 420
422 if (m_savequeue.Count == 0 && m_sendqueue.Count == 0) 421 // We must lock both queues here so that QueueAppearanceSave() or *Send() don't m_updateTimer.Start() on
423 m_updateTimer.Stop(); 422 // another thread inbetween the first count calls and m_updateTimer.Stop() on this thread.
423 lock (m_sendqueue)
424 if (m_savequeue.Count == 0 && m_sendqueue.Count == 0)
425 m_updateTimer.Stop();
426 }
424 } 427 }
425 428
426 private void SaveAppearance(UUID agentid) 429 private void SaveAppearance(UUID agentid)