Fixed the way OnQueueEmpty is called to prevent simultaneous calls for the same category

prioritization
John Hurliman 2009-10-21 01:07:40 -07:00
parent cde47c2b3d
commit c0c845aea4
1 changed files with 7 additions and 7 deletions

View File

@ -541,7 +541,10 @@ namespace OpenSim.Region.ClientStack.LindenUDP
if (throttleIndex > 0) if (throttleIndex > 0)
{ {
if (!m_onQueueEmptyRunning[throttleIndex]) if (!m_onQueueEmptyRunning[throttleIndex])
{
m_onQueueEmptyRunning[throttleIndex] = true;
Util.FireAndForget(FireQueueEmpty, throttleIndex); Util.FireAndForget(FireQueueEmpty, throttleIndex);
}
} }
} }
@ -559,14 +562,11 @@ namespace OpenSim.Region.ClientStack.LindenUDP
if (callback != null) if (callback != null)
{ {
if (!m_onQueueEmptyRunning[i]) try { callback(type); }
{ catch (Exception e) { m_log.Error("[LLUDPCLIENT]: OnQueueEmpty(" + type + ") threw an exception: " + e.Message, e); }
m_onQueueEmptyRunning[i] = true;
try { callback(type); }
catch (Exception e) { m_log.Error("[LLUDPCLIENT]: OnQueueEmpty(" + type + ") threw an exception: " + e.Message, e); }
m_onQueueEmptyRunning[i] = false;
}
} }
m_onQueueEmptyRunning[i] = false;
} }
} }
} }