diff --git a/OpenSim/Region/ClientStack/Linden/UDP/Tests/ThrottleTests.cs b/OpenSim/Region/ClientStack/Linden/UDP/Tests/ThrottleTests.cs index 0560b9bc32..17e1af6156 100644 --- a/OpenSim/Region/ClientStack/Linden/UDP/Tests/ThrottleTests.cs +++ b/OpenSim/Region/ClientStack/Linden/UDP/Tests/ThrottleTests.cs @@ -141,7 +141,7 @@ namespace OpenSim.Region.ClientStack.LindenUDP.Tests udpServer.Throttle.DebugLevel = 1; udpClient.ThrottleDebugLevel = 1; - + int resendBytes = 1000; int landBytes = 2000; int windBytes = 3000; @@ -208,7 +208,7 @@ namespace OpenSim.Region.ClientStack.LindenUDP.Tests textureBytes * commitRatio, assetBytes * commitRatio, udpClient.FlowThrottle.AdjustedDripRate, totalBytes, 0); // Test an increase in target throttle - udpClient.FlowThrottle.AcknowledgePackets(35000); + udpClient.FlowThrottle.AcknowledgePackets(25); commitRatio = 0.2; AssertThrottles( diff --git a/OpenSim/Region/ClientStack/Linden/UDP/TokenBucket.cs b/OpenSim/Region/ClientStack/Linden/UDP/TokenBucket.cs index c0cdff6d90..e67c0f5bb8 100644 --- a/OpenSim/Region/ClientStack/Linden/UDP/TokenBucket.cs +++ b/OpenSim/Region/ClientStack/Linden/UDP/TokenBucket.cs @@ -61,7 +61,7 @@ namespace OpenSim.Region.ClientStack.LindenUDP /// /// - protected const Int32 m_minimumDripRate = 1400; + protected const Int32 m_minimumDripRate = LLUDPServer.MTU; /// Time of the last drip, in system ticks protected Int32 m_lastDrip; @@ -447,12 +447,12 @@ namespace OpenSim.Region.ClientStack.LindenUDP /// /// Reliable packets acked by the client adjust the drip rate up. - /// Number of bytes acknowledged + /// Number of packets successfully acknowledged /// - public void AcknowledgePackets(Int32 bytes) + public void AcknowledgePackets(Int32 packets) { if (AdaptiveEnabled) - AdjustedDripRate = AdjustedDripRate + bytes; + AdjustedDripRate = AdjustedDripRate + packets * LLUDPServer.MTU; } } } \ No newline at end of file diff --git a/OpenSim/Region/ClientStack/Linden/UDP/UnackedPacketCollection.cs b/OpenSim/Region/ClientStack/Linden/UDP/UnackedPacketCollection.cs index 9d6c09e612..adf019f104 100644 --- a/OpenSim/Region/ClientStack/Linden/UDP/UnackedPacketCollection.cs +++ b/OpenSim/Region/ClientStack/Linden/UDP/UnackedPacketCollection.cs @@ -192,7 +192,7 @@ namespace OpenSim.Region.ClientStack.LindenUDP // As with other network applications, assume that an acknowledged packet is an // indication that the network can handle a little more load, speed up the transmission - ackedPacket.Client.FlowThrottle.AcknowledgePackets(ackedPacket.Buffer.DataLength); + ackedPacket.Client.FlowThrottle.AcknowledgePackets(1); // Update stats Interlocked.Add(ref ackedPacket.Client.UnackedBytes, -ackedPacket.Buffer.DataLength);