diff --git a/internal/congestion/cubic_sender.go b/internal/congestion/cubic_sender.go index 087cf9294..20a75af26 100644 --- a/internal/congestion/cubic_sender.go +++ b/internal/congestion/cubic_sender.go @@ -83,7 +83,7 @@ func newCubicSender(clock Clock, rttStats *utils.RTTStats, reno bool, initialCon initialMaxCongestionWindow: initialMaxCongestionWindow, congestionWindow: initialCongestionWindow, minCongestionWindow: minCongestionWindow, - slowStartThreshold: initialMaxCongestionWindow, + slowStartThreshold: protocol.MaxByteCount, maxCongestionWindow: initialMaxCongestionWindow, cubic: NewCubic(clock), clock: clock, diff --git a/internal/congestion/cubic_sender_test.go b/internal/congestion/cubic_sender_test.go index 83b4a7002..6836ea99d 100644 --- a/internal/congestion/cubic_sender_test.go +++ b/internal/congestion/cubic_sender_test.go @@ -289,7 +289,7 @@ var _ = Describe("Cubic Sender", func() { It("RTO congestion window", func() { Expect(sender.GetCongestionWindow()).To(Equal(defaultWindowTCP)) - Expect(sender.slowStartThreshold).To(Equal(MaxCongestionWindow)) + Expect(sender.slowStartThreshold).To(Equal(protocol.MaxByteCount)) // Expect the window to decrease to the minimum once the RTO fires // and slow start threshold to be set to 1/2 of the CWND. @@ -420,7 +420,7 @@ var _ = Describe("Cubic Sender", func() { It("reset after connection migration", func() { Expect(sender.GetCongestionWindow()).To(Equal(defaultWindowTCP)) - Expect(sender.slowStartThreshold).To(Equal(MaxCongestionWindow)) + Expect(sender.slowStartThreshold).To(Equal(protocol.MaxByteCount)) // Starts with slow start. const numberOfAcks = 10