reduce the delay in ACKs to the minimum of rtt/2 and the constant

This commit is contained in:
Zlatin Balevsky
2021-09-17 17:32:37 +01:00
parent 3355daa334
commit f14b7d53a3

View File

@@ -78,7 +78,7 @@ class ACKSender implements Runnable {
// the unsentACKThreshold to figure out when to send an ACK instead of
// using the timer, so we can set the timeout/frequency higher
if (timeSinceACK < 2*1000)
return Math.max(rtt/2, ACK_FREQUENCY);
return Math.min(rtt/2, ACK_FREQUENCY);
else
return ACK_FREQUENCY;
}