aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/OpenSim/Region/ClientStack/LindenUDP/LLUDPClient.cs
diff options
context:
space:
mode:
Diffstat (limited to 'OpenSim/Region/ClientStack/LindenUDP/LLUDPClient.cs')
-rw-r--r--OpenSim/Region/ClientStack/LindenUDP/LLUDPClient.cs7
1 files changed, 4 insertions, 3 deletions
diff --git a/OpenSim/Region/ClientStack/LindenUDP/LLUDPClient.cs b/OpenSim/Region/ClientStack/LindenUDP/LLUDPClient.cs
index 5bf36e6..e02783a 100644
--- a/OpenSim/Region/ClientStack/LindenUDP/LLUDPClient.cs
+++ b/OpenSim/Region/ClientStack/LindenUDP/LLUDPClient.cs
@@ -403,11 +403,12 @@ namespace OpenSim.Region.ClientStack.LindenUDP
403 /// Queue an outgoing packet if appropriate. 403 /// Queue an outgoing packet if appropriate.
404 /// </summary> 404 /// </summary>
405 /// <param name="packet"></param> 405 /// <param name="packet"></param>
406 /// <param name="forceQueue">Always queue the packet if at all possible.</param>
406 /// <returns> 407 /// <returns>
407 /// true if the packet has been queued, 408 /// true if the packet has been queued,
408 /// false if the packet has not been queued and should be sent immediately. 409 /// false if the packet has not been queued and should be sent immediately.
409 /// </returns> 410 /// </returns>
410 public bool EnqueueOutgoing(OutgoingPacket packet) 411 public bool EnqueueOutgoing(OutgoingPacket packet, bool forceQueue)
411 { 412 {
412 int category = (int)packet.Category; 413 int category = (int)packet.Category;
413 414
@@ -416,14 +417,14 @@ namespace OpenSim.Region.ClientStack.LindenUDP
416 OpenSim.Framework.LocklessQueue<OutgoingPacket> queue = m_packetOutboxes[category]; 417 OpenSim.Framework.LocklessQueue<OutgoingPacket> queue = m_packetOutboxes[category];
417 TokenBucket bucket = m_throttleCategories[category]; 418 TokenBucket bucket = m_throttleCategories[category];
418 419
419 if (bucket.RemoveTokens(packet.Buffer.DataLength)) 420 if (!forceQueue && bucket.RemoveTokens(packet.Buffer.DataLength))
420 { 421 {
421 // Enough tokens were removed from the bucket, the packet will not be queued 422 // Enough tokens were removed from the bucket, the packet will not be queued
422 return false; 423 return false;
423 } 424 }
424 else 425 else
425 { 426 {
426 // Not enough tokens in the bucket, queue this packet 427 // Force queue specified or not enough tokens in the bucket, queue this packet
427 queue.Enqueue(packet); 428 queue.Enqueue(packet);
428 return true; 429 return true;
429 } 430 }