diff --git a/pkg/congestion/brutal.go b/pkg/congestion/brutal.go index 71d3467..f11ef46 100644 --- a/pkg/congestion/brutal.go +++ b/pkg/congestion/brutal.go @@ -6,6 +6,8 @@ import ( ) const ( + initMaxDatagramSize = 1252 + pktInfoSlotCount = 4 minSampleCount = 50 minAckRate = 0.75 @@ -28,7 +30,8 @@ type pktInfo struct { func NewBrutalSender(bps congestion.ByteCount) *BrutalSender { bs := &BrutalSender{ - bps: bps, + bps: bps, + maxDatagramSize: initMaxDatagramSize, } bs.pacer = newPacer(func() congestion.ByteCount { return congestion.ByteCount(float64(bs.bps) / bs.getAckRate()) diff --git a/pkg/congestion/pacer.go b/pkg/congestion/pacer.go index 100b14f..d074ac0 100644 --- a/pkg/congestion/pacer.go +++ b/pkg/congestion/pacer.go @@ -7,9 +7,8 @@ import ( ) const ( - initMaxDatagramSize = 1252 - maxBurstPackets = 10 - minPacingDelay = time.Millisecond + maxBurstPackets = 10 + minPacingDelay = time.Millisecond ) // The pacer implements a token bucket pacing algorithm.