From 23ed99ad05bbdae507375b85c9cece577bca39d0 Mon Sep 17 00:00:00 2001 From: Toby Date: Mon, 3 Jan 2022 21:58:08 -0800 Subject: [PATCH] feat: minAckRate = 0.75 --- pkg/congestion/brutal.go | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/pkg/congestion/brutal.go b/pkg/congestion/brutal.go index 55d1ee5..71d3467 100644 --- a/pkg/congestion/brutal.go +++ b/pkg/congestion/brutal.go @@ -8,6 +8,7 @@ import ( const ( pktInfoSlotCount = 4 minSampleCount = 50 + minAckRate = 0.75 ) type BrutalSender struct { @@ -113,8 +114,8 @@ func (b *BrutalSender) getAckRate() float64 { return 1 } rate := float64(ackCount) / float64(ackCount+lossCount) - if rate < 0.5 { - return 0.5 + if rate < minAckRate { + return minAckRate } return rate }