Merge pull request #1855 from lucas-clemente/fix-pacing-rate

fix pacing rate
This commit is contained in:
Marten Seemann
2019-04-08 01:52:04 +09:00
committed by GitHub

View File

@@ -89,7 +89,7 @@ func (c *cubicSender) TimeUntilSend(bytesInFlight protocol.ByteCount) time.Durat
return 0
}
}
delay := c.rttStats.SmoothedRTT() / time.Duration(2*c.GetCongestionWindow())
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
}