From c0c845aea462ea7b15580c72f5513e5e1ef02030 Mon Sep 17 00:00:00 2001 From: John Hurliman Date: Wed, 21 Oct 2009 01:07:40 -0700 Subject: Fixed the way OnQueueEmpty is called to prevent simultaneous calls for the same category --- OpenSim/Region/ClientStack/LindenUDP/LLUDPClient.cs | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) (limited to 'OpenSim') diff --git a/OpenSim/Region/ClientStack/LindenUDP/LLUDPClient.cs b/OpenSim/Region/ClientStack/LindenUDP/LLUDPClient.cs index b9d2c15..ca9925c 100644 --- a/OpenSim/Region/ClientStack/LindenUDP/LLUDPClient.cs +++ b/OpenSim/Region/ClientStack/LindenUDP/LLUDPClient.cs @@ -541,7 +541,10 @@ namespace OpenSim.Region.ClientStack.LindenUDP if (throttleIndex > 0) { if (!m_onQueueEmptyRunning[throttleIndex]) + { + m_onQueueEmptyRunning[throttleIndex] = true; Util.FireAndForget(FireQueueEmpty, throttleIndex); + } } } @@ -559,14 +562,11 @@ namespace OpenSim.Region.ClientStack.LindenUDP if (callback != null) { - if (!m_onQueueEmptyRunning[i]) - { - 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; - } + try { callback(type); } + catch (Exception e) { m_log.Error("[LLUDPCLIENT]: OnQueueEmpty(" + type + ") threw an exception: " + e.Message, e); } } + + m_onQueueEmptyRunning[i] = false; } } } -- cgit v1.1