Fixed the way OnQueueEmpty is called to prevent simultaneous calls for the same category
parent
cde47c2b3d
commit
c0c845aea4
|
@ -541,9 +541,12 @@ 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);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
}
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// Checks to see if this queue empty callback is already running,
|
/// Checks to see if this queue empty callback is already running,
|
||||||
|
@ -559,14 +562,11 @@ namespace OpenSim.Region.ClientStack.LindenUDP
|
||||||
|
|
||||||
if (callback != null)
|
if (callback != null)
|
||||||
{
|
{
|
||||||
if (!m_onQueueEmptyRunning[i])
|
|
||||||
{
|
|
||||||
m_onQueueEmptyRunning[i] = true;
|
|
||||||
try { callback(type); }
|
try { callback(type); }
|
||||||
catch (Exception e) { m_log.Error("[LLUDPCLIENT]: OnQueueEmpty(" + type + ") threw an exception: " + e.Message, e); }
|
catch (Exception e) { m_log.Error("[LLUDPCLIENT]: OnQueueEmpty(" + type + ") threw an exception: " + e.Message, e); }
|
||||||
|
}
|
||||||
|
|
||||||
m_onQueueEmptyRunning[i] = false;
|
m_onQueueEmptyRunning[i] = false;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue