diff --git a/OpenSim/Region/ClientStack/Linden/UDP/LLUDPClient.cs b/OpenSim/Region/ClientStack/Linden/UDP/LLUDPClient.cs index daed99a41f..7749446f52 100644 --- a/OpenSim/Region/ClientStack/Linden/UDP/LLUDPClient.cs +++ b/OpenSim/Region/ClientStack/Linden/UDP/LLUDPClient.cs @@ -31,7 +31,6 @@ using System.Net; using System.Threading; using log4net; using OpenSim.Framework; -using OpenSim.Framework.Monitoring; using OpenMetaverse; using OpenMetaverse.Packets; @@ -142,8 +141,6 @@ namespace OpenSim.Region.ClientStack.LindenUDP get { return m_throttleClient; } } - private AutoResetEvent m_queueEmptyEvent = new AutoResetEvent(false); - /// Throttle bucket for this agent's connection private readonly TokenBucket m_throttleCategory; /// Throttle buckets for each packet category @@ -216,19 +213,6 @@ namespace OpenSim.Region.ClientStack.LindenUDP // Initialize this to a sane value to prevent early disconnects TickLastPacketReceived = Environment.TickCount & Int32.MaxValue; - - Watchdog.StartThread( - ActOnEmptyQueue, string.Format("ActOnEmptyQueue {0}", AgentID), ThreadPriority.Normal, false, false); - } - - private void ActOnEmptyQueue() - { - while (true) - { - m_queueEmptyEvent.WaitOne(); - FireQueueEmpty(m_categories); - Watchdog.UpdateThread(); - } } /// @@ -562,9 +546,7 @@ namespace OpenSim.Region.ClientStack.LindenUDP } if (emptyCategories != 0) - { BeginFireQueueEmpty(emptyCategories); - } //m_log.Info("[LLUDPCLIENT]: Queues: " + queueDebugOutput); // Serious debug business return packetSent; @@ -624,8 +606,6 @@ namespace OpenSim.Region.ClientStack.LindenUDP RTO = Math.Min(RTO * 2, m_maxRTO); } - private ThrottleOutPacketTypeFlags m_categories = 0; - /// /// Does an early check to see if this queue empty callback is already /// running, then asynchronously firing the event @@ -637,19 +617,9 @@ namespace OpenSim.Region.ClientStack.LindenUDP { // Use a value of 0 to signal that FireQueueEmpty is running m_nextOnQueueEmpty = 0; - m_categories = categories; - m_queueEmptyEvent.Set(); // Asynchronously run the callback - //Util.FireAndForget(FireQueueEmpty, categories); + Util.FireAndForget(FireQueueEmpty, categories); } - -// if (m_nextOnQueueEmpty != 0 && (Environment.TickCount & Int32.MaxValue) >= m_nextOnQueueEmpty) -// { -// // Use a value of 0 to signal that FireQueueEmpty is running -// m_nextOnQueueEmpty = 0; -// // Asynchronously run the callback -// Util.FireAndForget(FireQueueEmpty, categories); -// } } /// @@ -661,8 +631,6 @@ namespace OpenSim.Region.ClientStack.LindenUDP /// signature private void FireQueueEmpty(object o) { -// m_log.DebugFormat("[LLUDPCLIENT]: Firing outbound UDP queue empty for {0}", AgentID); - const int MIN_CALLBACK_MS = 30; ThrottleOutPacketTypeFlags categories = (ThrottleOutPacketTypeFlags)o;