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.iar_mods
parent
fc9400db07
commit
e8fbeeba5f
|
@ -417,11 +417,14 @@ namespace OpenSim.Region.CoreModules.Avatar.AvatarFactory
|
|||
m_savequeue.Remove(avatarID);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
// We must lock both queues here so that QueueAppearanceSave() or *Send() don't m_updateTimer.Start() on
|
||||
// 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();
|
||||
}
|
||||
}
|
||||
|
||||
private void SaveAppearance(UUID agentid)
|
||||
{
|
||||
|
|
Loading…
Reference in New Issue