From f7eb13fff1c8768f166e0d91f34d424c05842253 Mon Sep 17 00:00:00 2001 From: Marten Seemann Date: Thu, 25 Jul 2019 16:34:44 -0400 Subject: [PATCH] disable the two-connection mode of the congestion controller --- internal/congestion/cubic.go | 2 +- internal/congestion/cubic_test.go | 1 + 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/internal/congestion/cubic.go b/internal/congestion/cubic.go index dcf91fc6d..8c4de76eb 100644 --- a/internal/congestion/cubic.go +++ b/internal/congestion/cubic.go @@ -21,7 +21,7 @@ const cubeScale = 40 const cubeCongestionWindowScale = 410 const cubeFactor protocol.ByteCount = 1 << cubeScale / cubeCongestionWindowScale / protocol.DefaultTCPMSS -const defaultNumConnections = 2 +const defaultNumConnections = 1 // Default Cubic backoff factor const beta float32 = 0.7 diff --git a/internal/congestion/cubic_test.go b/internal/congestion/cubic_test.go index 52cae1456..6583e6a9f 100644 --- a/internal/congestion/cubic_test.go +++ b/internal/congestion/cubic_test.go @@ -24,6 +24,7 @@ var _ = Describe("Cubic", func() { BeforeEach(func() { clock = mockClock{} cubic = NewCubic(&clock) + cubic.SetNumConnections(int(numConnections)) }) renoCwnd := func(currentCwnd protocol.ByteCount) protocol.ByteCount {