aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/OpenSim/Region/ClientStack/Linden/UDP/LLUDPClient.cs
diff options
context:
space:
mode:
Diffstat (limited to 'OpenSim/Region/ClientStack/Linden/UDP/LLUDPClient.cs')
-rw-r--r--OpenSim/Region/ClientStack/Linden/UDP/LLUDPClient.cs22
1 files changed, 15 insertions, 7 deletions
diff --git a/OpenSim/Region/ClientStack/Linden/UDP/LLUDPClient.cs b/OpenSim/Region/ClientStack/Linden/UDP/LLUDPClient.cs
index d59b761..e85cee2 100644
--- a/OpenSim/Region/ClientStack/Linden/UDP/LLUDPClient.cs
+++ b/OpenSim/Region/ClientStack/Linden/UDP/LLUDPClient.cs
@@ -120,13 +120,13 @@ namespace OpenSim.Region.ClientStack.LindenUDP
120 /// <summary>Circuit code that this client is connected on</summary> 120 /// <summary>Circuit code that this client is connected on</summary>
121 public readonly uint CircuitCode; 121 public readonly uint CircuitCode;
122 /// <summary>Sequence numbers of packets we've received (for duplicate checking)</summary> 122 /// <summary>Sequence numbers of packets we've received (for duplicate checking)</summary>
123 public readonly IncomingPacketHistoryCollection PacketArchive = new IncomingPacketHistoryCollection(200); 123 public IncomingPacketHistoryCollection PacketArchive = new IncomingPacketHistoryCollection(200);
124 124
125 /// <summary>Packets we have sent that need to be ACKed by the client</summary> 125 /// <summary>Packets we have sent that need to be ACKed by the client</summary>
126 public readonly UnackedPacketCollection NeedAcks = new UnackedPacketCollection(); 126 public UnackedPacketCollection NeedAcks = new UnackedPacketCollection();
127 127
128 /// <summary>ACKs that are queued up, waiting to be sent to the client</summary> 128 /// <summary>ACKs that are queued up, waiting to be sent to the client</summary>
129 public readonly DoubleLocklessQueue<uint> PendingAcks = new DoubleLocklessQueue<uint>(); 129 public DoubleLocklessQueue<uint> PendingAcks = new DoubleLocklessQueue<uint>();
130 130
131 /// <summary>Current packet sequence number</summary> 131 /// <summary>Current packet sequence number</summary>
132 public int CurrentSequence; 132 public int CurrentSequence;
@@ -170,7 +170,7 @@ namespace OpenSim.Region.ClientStack.LindenUDP
170 private double m_nextOnQueueEmpty = 0; 170 private double m_nextOnQueueEmpty = 0;
171 171
172 /// <summary>Throttle bucket for this agent's connection</summary> 172 /// <summary>Throttle bucket for this agent's connection</summary>
173 private readonly AdaptiveTokenBucket m_throttleClient; 173 private AdaptiveTokenBucket m_throttleClient;
174 public AdaptiveTokenBucket FlowThrottle 174 public AdaptiveTokenBucket FlowThrottle
175 { 175 {
176 get { return m_throttleClient; } 176 get { return m_throttleClient; }
@@ -179,10 +179,10 @@ namespace OpenSim.Region.ClientStack.LindenUDP
179 /// <summary>Throttle buckets for each packet category</summary> 179 /// <summary>Throttle buckets for each packet category</summary>
180 private readonly TokenBucket[] m_throttleCategories; 180 private readonly TokenBucket[] m_throttleCategories;
181 /// <summary>Outgoing queues for throttled packets</summary> 181 /// <summary>Outgoing queues for throttled packets</summary>
182 private readonly DoubleLocklessQueue<OutgoingPacket>[] m_packetOutboxes = new DoubleLocklessQueue<OutgoingPacket>[THROTTLE_CATEGORY_COUNT]; 182 private DoubleLocklessQueue<OutgoingPacket>[] m_packetOutboxes = new DoubleLocklessQueue<OutgoingPacket>[THROTTLE_CATEGORY_COUNT];
183 /// <summary>A container that can hold one packet for each outbox, used to store 183 /// <summary>A container that can hold one packet for each outbox, used to store
184 /// dequeued packets that are being held for throttling</summary> 184 /// dequeued packets that are being held for throttling</summary>
185 private readonly OutgoingPacket[] m_nextPackets = new OutgoingPacket[THROTTLE_CATEGORY_COUNT]; 185 private OutgoingPacket[] m_nextPackets = new OutgoingPacket[THROTTLE_CATEGORY_COUNT];
186 /// <summary>A reference to the LLUDPServer that is managing this client</summary> 186 /// <summary>A reference to the LLUDPServer that is managing this client</summary>
187 private readonly LLUDPServer m_udpServer; 187 private readonly LLUDPServer m_udpServer;
188 188
@@ -288,14 +288,22 @@ namespace OpenSim.Region.ClientStack.LindenUDP
288 for (int i = 0; i < THROTTLE_CATEGORY_COUNT; i++) 288 for (int i = 0; i < THROTTLE_CATEGORY_COUNT; i++)
289 { 289 {
290 m_packetOutboxes[i].Clear(); 290 m_packetOutboxes[i].Clear();
291 m_throttleCategories[i] = null;
291 m_nextPackets[i] = null; 292 m_nextPackets[i] = null;
292 } 293 }
293 294
294 // pull the throttle out of the scene throttle 295 // pull the throttle out of the scene throttle
295 m_throttleClient.Parent.UnregisterRequest(m_throttleClient); 296 m_throttleClient.Parent.UnregisterRequest(m_throttleClient);
297 m_throttleClient = null;
296 OnPacketStats = null; 298 OnPacketStats = null;
297 OnQueueEmpty = null; 299 OnQueueEmpty = null;
298 } 300 PendingAcks.Clear();
301 NeedAcks.Clear();
302 NeedAcks = null;
303 PendingAcks = null;
304 m_nextPackets = null;
305 m_packetOutboxes = null;
306 }
299 307
300 /// <summary> 308 /// <summary>
301 /// Gets information about this client connection 309 /// Gets information about this client connection