* Fixed a potential threading issue with EventQueueGet leading to spontaneous crashes.
parent
d19400db44
commit
fa55fc89d8
|
@ -131,14 +131,18 @@ namespace OpenSim.Region.Environment.Modules.Framework
|
||||||
#endregion
|
#endregion
|
||||||
|
|
||||||
private BlockingLLSDQueue GetQueue(UUID agentId)
|
private BlockingLLSDQueue GetQueue(UUID agentId)
|
||||||
|
{
|
||||||
|
lock (queues)
|
||||||
{
|
{
|
||||||
if (!queues.ContainsKey(agentId))
|
if (!queues.ContainsKey(agentId))
|
||||||
{
|
{
|
||||||
m_log.DebugFormat("[EVENTQUEUE]: Adding new queue for agent {0} in region {1}", agentId, m_scene.RegionInfo.RegionName);
|
m_log.DebugFormat("[EVENTQUEUE]: Adding new queue for agent {0} in region {1}", agentId,
|
||||||
|
m_scene.RegionInfo.RegionName);
|
||||||
queues[agentId] = new BlockingLLSDQueue();
|
queues[agentId] = new BlockingLLSDQueue();
|
||||||
}
|
}
|
||||||
return queues[agentId];
|
return queues[agentId];
|
||||||
}
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
#region IEventQueue Members
|
#region IEventQueue Members
|
||||||
|
@ -163,8 +167,11 @@ namespace OpenSim.Region.Environment.Modules.Framework
|
||||||
}
|
}
|
||||||
|
|
||||||
private void ClientClosed(UUID AgentID)
|
private void ClientClosed(UUID AgentID)
|
||||||
|
{
|
||||||
|
lock (queues)
|
||||||
{
|
{
|
||||||
queues.Remove(AgentID);
|
queues.Remove(AgentID);
|
||||||
|
}
|
||||||
List<UUID> removeitems = new List<UUID>();
|
List<UUID> removeitems = new List<UUID>();
|
||||||
lock (m_AvatarQueueUUIDMapping)
|
lock (m_AvatarQueueUUIDMapping)
|
||||||
{
|
{
|
||||||
|
|
Loading…
Reference in New Issue