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.0.7.2-post-fixes
parent
546eb88112
commit
48ea503c33
|
@ -475,10 +475,13 @@ namespace OpenSim.Region.CoreModules.Avatar.AvatarFactory
|
||||||
m_savequeue.Remove(avatarID);
|
m_savequeue.Remove(avatarID);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
|
||||||
|
|
||||||
if (m_savequeue.Count == 0 && m_sendqueue.Count == 0)
|
// We must lock both queues here so that QueueAppearanceSave() or *Send() don't m_updateTimer.Start() on
|
||||||
m_updateTimer.Stop();
|
// another thread inbetween the first count calls and m_updateTimer.Stop() on this thread.
|
||||||
|
lock (m_sendqueue)
|
||||||
|
if (m_savequeue.Count == 0 && m_sendqueue.Count == 0)
|
||||||
|
m_updateTimer.Stop();
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
#endregion
|
#endregion
|
||||||
|
|
Loading…
Reference in New Issue