* Fixed a potential race condition with adding Caps handlers

afrisby
Teravus Ovares 2007-12-18 01:49:21 +00:00
parent 38fe0dfa90
commit badcbd4bea
1 changed files with 9 additions and 1 deletions

View File

@ -1334,8 +1334,16 @@ namespace OpenSim.Region.Environment.Scenes
{
//MainLog.Instance.Warn("client", "Adding duplicate CAPS entry for user " +
// agent.AgentID.ToStringHyphenated());
try
{
m_capsHandlers[agent.AgentID] = cap;
}
catch (System.Collections.Generic.KeyNotFoundException)
{
// Fix for a potential race condition.
m_capsHandlers.Add(agent.AgentID, cap);
}
}
else
{
m_capsHandlers.Add(agent.AgentID, cap);