diff options
Diffstat (limited to 'OpenSim/Region/ClientStack/LindenUDP/UnackedPacketCollection.cs')
-rw-r--r-- | OpenSim/Region/ClientStack/LindenUDP/UnackedPacketCollection.cs | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/OpenSim/Region/ClientStack/LindenUDP/UnackedPacketCollection.cs b/OpenSim/Region/ClientStack/LindenUDP/UnackedPacketCollection.cs index 4cb4aee..d762bef 100644 --- a/OpenSim/Region/ClientStack/LindenUDP/UnackedPacketCollection.cs +++ b/OpenSim/Region/ClientStack/LindenUDP/UnackedPacketCollection.cs | |||
@@ -28,6 +28,7 @@ | |||
28 | using System; | 28 | using System; |
29 | using System.Collections.Generic; | 29 | using System.Collections.Generic; |
30 | using System.Net; | 30 | using System.Net; |
31 | using System.Threading; | ||
31 | using OpenMetaverse; | 32 | using OpenMetaverse; |
32 | 33 | ||
33 | namespace OpenSim.Region.ClientStack.LindenUDP | 34 | namespace OpenSim.Region.ClientStack.LindenUDP |
@@ -77,6 +78,7 @@ namespace OpenSim.Region.ClientStack.LindenUDP | |||
77 | public void Add(OutgoingPacket packet) | 78 | public void Add(OutgoingPacket packet) |
78 | { | 79 | { |
79 | m_pendingAdds.Enqueue(packet); | 80 | m_pendingAdds.Enqueue(packet); |
81 | Interlocked.Add(ref packet.Client.UnackedBytes, packet.Buffer.DataLength); | ||
80 | } | 82 | } |
81 | 83 | ||
82 | /// <summary> | 84 | /// <summary> |
@@ -166,7 +168,7 @@ namespace OpenSim.Region.ClientStack.LindenUDP | |||
166 | m_packets.Remove(pendingRemove.SequenceNumber); | 168 | m_packets.Remove(pendingRemove.SequenceNumber); |
167 | 169 | ||
168 | // Update stats | 170 | // Update stats |
169 | System.Threading.Interlocked.Add(ref ackedPacket.Client.UnackedBytes, -ackedPacket.Buffer.DataLength); | 171 | Interlocked.Add(ref ackedPacket.Client.UnackedBytes, -ackedPacket.Buffer.DataLength); |
170 | 172 | ||
171 | if (!pendingRemove.FromResend) | 173 | if (!pendingRemove.FromResend) |
172 | { | 174 | { |