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 ? )
avinationmerge
UbitUmarov 2014-07-24 17:14:14 +01:00
parent 05d071a430
commit ee951f7a10
1 changed files with 9 additions and 10 deletions

View File

@ -307,12 +307,12 @@ namespace OpenSim.Region.ClientStack.Linden
lock (m_AvatarQueueUUIDMapping) lock (m_AvatarQueueUUIDMapping)
{ {
// Reuse open queues. The client does! // Reuse open queues. The client does!
if (m_AvatarQueueUUIDMapping.ContainsKey(agentID)) // if (m_AvatarQueueUUIDMapping.ContainsKey(agentID))
{ // {
//m_log.DebugFormat("[EVENTQUEUE]: Found Existing UUID!"); //m_log.DebugFormat("[EVENTQUEUE]: Found Existing UUID!");
eventQueueGetUUID = m_AvatarQueueUUIDMapping[agentID]; // eventQueueGetUUID = m_AvatarQueueUUIDMapping[agentID];
} // }
else // else
{ {
eventQueueGetUUID = UUID.Random(); eventQueueGetUUID = UUID.Random();
//m_log.DebugFormat("[EVENTQUEUE]: Using random UUID!"); //m_log.DebugFormat("[EVENTQUEUE]: Using random UUID!");
@ -345,9 +345,6 @@ namespace OpenSim.Region.ClientStack.Linden
public bool HasEvents(UUID requestID, UUID agentID) public bool HasEvents(UUID requestID, UUID agentID)
{ {
// Don't use this, because of race conditions at agent closing time
//Queue<OSD> queue = TryGetQueue(agentID);
Queue<OSD> queue = GetQueue(agentID); Queue<OSD> queue = GetQueue(agentID);
if (queue != null) if (queue != null)
lock (queue) lock (queue)
@ -356,7 +353,8 @@ namespace OpenSim.Region.ClientStack.Linden
return queue.Count > 0; return queue.Count > 0;
} }
return false; m_log.WarnFormat("POLLED FOR EVENTS BY {0} unknown agent", agentID);
return true;
} }
/// <summary> /// <summary>
@ -382,7 +380,8 @@ namespace OpenSim.Region.ClientStack.Linden
Queue<OSD> queue = GetQueue(pAgentId); Queue<OSD> queue = GetQueue(pAgentId);
if (queue == null) if (queue == null)
{ {
return NoEvents(requestID, pAgentId); //return NoEvents(requestID, pAgentId);
return null;
} }
OSD element; OSD element;