From 780f34275bbad26c235ab5da1c8ec959b09c0bf1 Mon Sep 17 00:00:00 2001 From: Melanie Thielker Date: Sat, 2 May 2009 20:08:26 +0000 Subject: [PATCH] Handle resends better --- OpenSim/Region/ClientStack/LindenUDP/LLPacketHandler.cs | 2 +- OpenSim/Region/ClientStack/LindenUDP/LLPacketQueue.cs | 5 +++++ 2 files changed, 6 insertions(+), 1 deletion(-) diff --git a/OpenSim/Region/ClientStack/LindenUDP/LLPacketHandler.cs b/OpenSim/Region/ClientStack/LindenUDP/LLPacketHandler.cs index d4377ad6e6..c020b38846 100644 --- a/OpenSim/Region/ClientStack/LindenUDP/LLPacketHandler.cs +++ b/OpenSim/Region/ClientStack/LindenUDP/LLPacketHandler.cs @@ -311,7 +311,7 @@ namespace OpenSim.Region.ClientStack.LindenUDP // Packets this old get resent // - if ((now - data.TickCount) > m_ResendTimeout && data.Sequence != 0) + if ((now - data.TickCount) > m_ResendTimeout && data.Sequence != 0 && !m_PacketQueue.Contains(data.Sequence)) { if (resent < 20) { diff --git a/OpenSim/Region/ClientStack/LindenUDP/LLPacketQueue.cs b/OpenSim/Region/ClientStack/LindenUDP/LLPacketQueue.cs index 46d56103dc..5ed92fe7a3 100644 --- a/OpenSim/Region/ClientStack/LindenUDP/LLPacketQueue.cs +++ b/OpenSim/Region/ClientStack/LindenUDP/LLPacketQueue.cs @@ -251,6 +251,11 @@ namespace OpenSim.Region.ClientStack.LindenUDP ; } + public bool Contains(uint sequence) + { + return contents.Contains(sequence); + } + public void Flush() { lock (this)