Revert the index -> Add changes made in AvatarFactoryModule previously. It appears that in conjunction with MW's locking changes, that two threads may race to create the avatar

appearance in the TryGetAvatarAppearance() method.  Moving off Add will mean the second replaces the first instead of throwing the exception.  This may still not be a good 
permanent solution - more extensively locking or a code rearrangement could be better.  I'm going to leave this in MW's much more familiar hands now.
ThreadPoolClientBranch
Justin Clarke Casey 2008-02-14 11:10:43 +00:00
parent 135a72d6ca
commit 1229503764
1 changed files with 2 additions and 2 deletions

View File

@ -72,7 +72,7 @@ namespace OpenSim.Region.Environment.Modules
appearance.TextureEntry = AvatarAppearance.GetDefaultTextureEntry();
lock (m_avatarsAppearance)
{
m_avatarsAppearance.Add(avatarId, appearance);
m_avatarsAppearance[avatarId] = appearance;
}
return true;
}
@ -87,7 +87,7 @@ namespace OpenSim.Region.Environment.Modules
//add appearance to dictionary cache
lock (m_avatarsAppearance)
{
m_avatarsAppearance.Add(avatarId, appearance);
m_avatarsAppearance[avatarId] = appearance;
}
//update database