From ac0acb02962c37f870dc38a356e1530803f699e8 Mon Sep 17 00:00:00 2001 From: John Hurliman Date: Fri, 23 Oct 2009 01:33:05 -0700 Subject: [PATCH] * Changed the max RTO value to 60 seconds to comply with RFC 2988 * Implemented section 5.5, exponential backoff of the RTO after a resend --- OpenSim/Region/ClientStack/LindenUDP/LLUDPClient.cs | 2 +- OpenSim/Region/ClientStack/LindenUDP/LLUDPServer.cs | 3 +++ 2 files changed, 4 insertions(+), 1 deletion(-) diff --git a/OpenSim/Region/ClientStack/LindenUDP/LLUDPClient.cs b/OpenSim/Region/ClientStack/LindenUDP/LLUDPClient.cs index 460938e2bd..d2cd6d90ea 100644 --- a/OpenSim/Region/ClientStack/LindenUDP/LLUDPClient.cs +++ b/OpenSim/Region/ClientStack/LindenUDP/LLUDPClient.cs @@ -500,7 +500,7 @@ namespace OpenSim.Region.ClientStack.LindenUDP RTO = (int)(SRTT + Math.Max(m_udpServer.TickCountResolution, K * RTTVAR)); // Clamp the retransmission timeout to manageable values - RTO = Utils.Clamp(RTO, 3000, 10000); + RTO = Utils.Clamp(RTO, 3000, 60000); //m_log.Debug("[LLUDPCLIENT]: Setting agent " + this.Agent.FullName + "'s RTO to " + RTO + "ms with an RTTVAR of " + // RTTVAR + " based on new RTT of " + r + "ms"); diff --git a/OpenSim/Region/ClientStack/LindenUDP/LLUDPServer.cs b/OpenSim/Region/ClientStack/LindenUDP/LLUDPServer.cs index 2973d4b68c..7e929e52b6 100644 --- a/OpenSim/Region/ClientStack/LindenUDP/LLUDPServer.cs +++ b/OpenSim/Region/ClientStack/LindenUDP/LLUDPServer.cs @@ -407,6 +407,9 @@ namespace OpenSim.Region.ClientStack.LindenUDP { //m_log.Debug("[LLUDPSERVER]: Resending " + expiredPackets.Count + " packets to " + udpClient.AgentID + ", RTO=" + udpClient.RTO); + // Backoff the RTO + udpClient.RTO = Math.Min(udpClient.RTO * 2, 60000); + // Resend packets for (int i = 0; i < expiredPackets.Count; i++) {