From 6be9c7bfcd0d5bac0e0cdb5390eef1d7902282b6 Mon Sep 17 00:00:00 2001 From: Marten Seemann Date: Mon, 8 Apr 2019 13:38:12 +0900 Subject: [PATCH] use the full pacing rate, also when not in slow start --- internal/congestion/cubic_sender.go | 6 +----- 1 file changed, 1 insertion(+), 5 deletions(-) diff --git a/internal/congestion/cubic_sender.go b/internal/congestion/cubic_sender.go index a2b0af51a..6f3d3289a 100644 --- a/internal/congestion/cubic_sender.go +++ b/internal/congestion/cubic_sender.go @@ -89,11 +89,7 @@ func (c *cubicSender) TimeUntilSend(bytesInFlight protocol.ByteCount) time.Durat return 0 } } - delay := c.rttStats.SmoothedRTT() * time.Duration(protocol.DefaultTCPMSS) / time.Duration(2*c.GetCongestionWindow()) - if !c.InSlowStart() { // adjust delay, such that it's 1.25*cwd/rtt - delay = delay * 8 / 5 - } - return delay + return c.rttStats.SmoothedRTT() * time.Duration(protocol.DefaultTCPMSS) / time.Duration(2*c.GetCongestionWindow()) } func (c *cubicSender) OnPacketSent(