aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/OpenSim/Region/ClientStack/LindenUDP/LLUDPClient.cs
diff options
context:
space:
mode:
Diffstat (limited to '')
-rw-r--r--OpenSim/Region/ClientStack/LindenUDP/LLUDPClient.cs10
1 files changed, 10 insertions, 0 deletions
diff --git a/OpenSim/Region/ClientStack/LindenUDP/LLUDPClient.cs b/OpenSim/Region/ClientStack/LindenUDP/LLUDPClient.cs
index c4db5da..ed0e60d 100644
--- a/OpenSim/Region/ClientStack/LindenUDP/LLUDPClient.cs
+++ b/OpenSim/Region/ClientStack/LindenUDP/LLUDPClient.cs
@@ -149,6 +149,7 @@ namespace OpenSim.Region.ClientStack.LindenUDP
149 149
150 private int m_defaultRTO = 3000; 150 private int m_defaultRTO = 3000;
151 private int m_maxRTO = 60000; 151 private int m_maxRTO = 60000;
152 public bool m_deliverPackets = true;
152 153
153 /// <summary> 154 /// <summary>
154 /// Default constructor 155 /// Default constructor
@@ -406,6 +407,13 @@ namespace OpenSim.Region.ClientStack.LindenUDP
406 if (category >= 0 && category < m_packetOutboxes.Length) 407 if (category >= 0 && category < m_packetOutboxes.Length)
407 { 408 {
408 OpenSim.Framework.LocklessQueue<OutgoingPacket> queue = m_packetOutboxes[category]; 409 OpenSim.Framework.LocklessQueue<OutgoingPacket> queue = m_packetOutboxes[category];
410
411 if (m_deliverPackets == false)
412 {
413 queue.Enqueue(packet);
414 return true;
415 }
416
409 TokenBucket bucket = m_throttleCategories[category]; 417 TokenBucket bucket = m_throttleCategories[category];
410 418
411 if (bucket.RemoveTokens(packet.Buffer.DataLength)) 419 if (bucket.RemoveTokens(packet.Buffer.DataLength))
@@ -442,6 +450,8 @@ namespace OpenSim.Region.ClientStack.LindenUDP
442 /// <returns>True if any packets were sent, otherwise false</returns> 450 /// <returns>True if any packets were sent, otherwise false</returns>
443 public bool DequeueOutgoing() 451 public bool DequeueOutgoing()
444 { 452 {
453 if (m_deliverPackets == false) return false;
454
445 OutgoingPacket packet; 455 OutgoingPacket packet;
446 OpenSim.Framework.LocklessQueue<OutgoingPacket> queue; 456 OpenSim.Framework.LocklessQueue<OutgoingPacket> queue;
447 TokenBucket bucket; 457 TokenBucket bucket;