aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/OpenSim/Region/Environment/Modules
diff options
context:
space:
mode:
Diffstat (limited to '')
-rw-r--r--OpenSim/Region/Environment/Modules/Framework/EventQueueGetModule.cs17
1 files changed, 12 insertions, 5 deletions
diff --git a/OpenSim/Region/Environment/Modules/Framework/EventQueueGetModule.cs b/OpenSim/Region/Environment/Modules/Framework/EventQueueGetModule.cs
index 78e2df5..5f20dc1 100644
--- a/OpenSim/Region/Environment/Modules/Framework/EventQueueGetModule.cs
+++ b/OpenSim/Region/Environment/Modules/Framework/EventQueueGetModule.cs
@@ -132,12 +132,16 @@ namespace OpenSim.Region.Environment.Modules.Framework
132 132
133 private BlockingLLSDQueue GetQueue(UUID agentId) 133 private BlockingLLSDQueue GetQueue(UUID agentId)
134 { 134 {
135 if (!queues.ContainsKey(agentId)) 135 lock (queues)
136 { 136 {
137 m_log.DebugFormat("[EVENTQUEUE]: Adding new queue for agent {0} in region {1}", agentId, m_scene.RegionInfo.RegionName); 137 if (!queues.ContainsKey(agentId))
138 queues[agentId] = new BlockingLLSDQueue(); 138 {
139 m_log.DebugFormat("[EVENTQUEUE]: Adding new queue for agent {0} in region {1}", agentId,
140 m_scene.RegionInfo.RegionName);
141 queues[agentId] = new BlockingLLSDQueue();
142 }
143 return queues[agentId];
139 } 144 }
140 return queues[agentId];
141 } 145 }
142 146
143 147
@@ -164,7 +168,10 @@ namespace OpenSim.Region.Environment.Modules.Framework
164 168
165 private void ClientClosed(UUID AgentID) 169 private void ClientClosed(UUID AgentID)
166 { 170 {
167 queues.Remove(AgentID); 171 lock (queues)
172 {
173 queues.Remove(AgentID);
174 }
168 List<UUID> removeitems = new List<UUID>(); 175 List<UUID> removeitems = new List<UUID>();
169 lock (m_AvatarQueueUUIDMapping) 176 lock (m_AvatarQueueUUIDMapping)
170 { 177 {