Prevent a nasty deadlock on teleport

avinationmerge
Melanie 2011-12-12 23:43:45 +01:00
parent 8418288e26
commit d18a9f22e7
1 changed files with 20 additions and 22 deletions

View File

@ -3135,16 +3135,15 @@ namespace OpenSim.Region.Framework.Scenes
catch { }
// Attachment objects
lock (m_attachments)
{
if (m_attachments.Count > 0)
List<SceneObjectGroup> attachments = GetAttachments();
if (attachments.Count > 0)
{
cAgent.AttachmentObjects = new List<ISceneObject>();
cAgent.AttachmentObjectStates = new List<string>();
// IScriptModule se = m_scene.RequestModuleInterface<IScriptModule>();
InTransitScriptStates.Clear();
foreach (SceneObjectGroup sog in m_attachments)
foreach (SceneObjectGroup sog in attachments)
{
// We need to make a copy and pass that copy
// because of transfers withn the same sim
@ -3161,7 +3160,6 @@ namespace OpenSim.Region.Framework.Scenes
}
}
}
}
private void CopyFrom(AgentData cAgent)
{