From ee951f7a1038eee5f0760674b0cffab9a6d0328f Mon Sep 17 00:00:00 2001 From: UbitUmarov Date: Thu, 24 Jul 2014 17:14:14 +0100 Subject: [PATCH] EventQueueGetModule: dont reuse queues, we dont know whats there; make pool silently loose requests for unknown avatars, or they will stay active until timeout after close ( possible not a big problem after not reusing queues ? ) --- .../Caps/EventQueue/EventQueueGetModule.cs | 19 +++++++++---------- 1 file changed, 9 insertions(+), 10 deletions(-) diff --git a/OpenSim/Region/ClientStack/Linden/Caps/EventQueue/EventQueueGetModule.cs b/OpenSim/Region/ClientStack/Linden/Caps/EventQueue/EventQueueGetModule.cs index ffb53af807..e0ce35b155 100644 --- a/OpenSim/Region/ClientStack/Linden/Caps/EventQueue/EventQueueGetModule.cs +++ b/OpenSim/Region/ClientStack/Linden/Caps/EventQueue/EventQueueGetModule.cs @@ -307,12 +307,12 @@ namespace OpenSim.Region.ClientStack.Linden lock (m_AvatarQueueUUIDMapping) { // Reuse open queues. The client does! - if (m_AvatarQueueUUIDMapping.ContainsKey(agentID)) - { +// if (m_AvatarQueueUUIDMapping.ContainsKey(agentID)) +// { //m_log.DebugFormat("[EVENTQUEUE]: Found Existing UUID!"); - eventQueueGetUUID = m_AvatarQueueUUIDMapping[agentID]; - } - else +// eventQueueGetUUID = m_AvatarQueueUUIDMapping[agentID]; +// } +// else { eventQueueGetUUID = UUID.Random(); //m_log.DebugFormat("[EVENTQUEUE]: Using random UUID!"); @@ -345,9 +345,6 @@ namespace OpenSim.Region.ClientStack.Linden public bool HasEvents(UUID requestID, UUID agentID) { - // Don't use this, because of race conditions at agent closing time - //Queue queue = TryGetQueue(agentID); - Queue queue = GetQueue(agentID); if (queue != null) lock (queue) @@ -356,7 +353,8 @@ namespace OpenSim.Region.ClientStack.Linden return queue.Count > 0; } - return false; + m_log.WarnFormat("POLLED FOR EVENTS BY {0} unknown agent", agentID); + return true; } /// @@ -382,7 +380,8 @@ namespace OpenSim.Region.ClientStack.Linden Queue queue = GetQueue(pAgentId); if (queue == null) { - return NoEvents(requestID, pAgentId); + //return NoEvents(requestID, pAgentId); + return null; } OSD element;