From 3640d0204f77dff3b1c4bd50229b60a49d2745e5 Mon Sep 17 00:00:00 2001 From: Dan Lake Date: Thu, 21 Apr 2011 01:51:08 -0700 Subject: Added ability to remove unacked packet from UnackedPacketCollection without an acknowledgement from the network. This prevents RTT and throttles from being updated as they would when an ACK is actually received. Also fixed stats logging for unacked bytes and resent packets in this case. --- OpenSim/Region/ClientStack/LindenUDP/LLClientView.cs | 12 ++++++++++-- 1 file changed, 10 insertions(+), 2 deletions(-) (limited to 'OpenSim/Region/ClientStack/LindenUDP/LLClientView.cs') diff --git a/OpenSim/Region/ClientStack/LindenUDP/LLClientView.cs b/OpenSim/Region/ClientStack/LindenUDP/LLClientView.cs index 1e8bbb8..6129e10 100644 --- a/OpenSim/Region/ClientStack/LindenUDP/LLClientView.cs +++ b/OpenSim/Region/ClientStack/LindenUDP/LLClientView.cs @@ -3590,7 +3590,11 @@ namespace OpenSim.Region.ClientStack.LindenUDP // Remove the update packet from the list of packets waiting for acknowledgement // because we are requeuing the list of updates. They will be resent in new packets // with the most recent state and priority. - m_udpClient.NeedAcks.Remove(oPacket.SequenceNumber, 0, true); + m_udpClient.NeedAcks.Remove(oPacket.SequenceNumber); + + // Count this as a resent packet since we are going to requeue all of the updates contained in it + Interlocked.Increment(ref m_udpClient.PacketsResent); + foreach (EntityUpdate update in updates) ResendPrimUpdate(update); } @@ -4038,7 +4042,11 @@ namespace OpenSim.Region.ClientStack.LindenUDP // Remove the update packet from the list of packets waiting for acknowledgement // because we are requeuing the list of updates. They will be resent in new packets // with the most recent state. - m_udpClient.NeedAcks.Remove(oPacket.SequenceNumber, 0, true); + m_udpClient.NeedAcks.Remove(oPacket.SequenceNumber); + + // Count this as a resent packet since we are going to requeue all of the updates contained in it + Interlocked.Increment(ref m_udpClient.PacketsResent); + foreach (ObjectPropertyUpdate update in updates) ResendPropertyUpdate(update); } -- cgit v1.1