Fix sequence number offset on packet drop (#1556)

This commit is contained in:
Raja Subramanian authored and GitHub committed 2023-03-29 07:43:28 +05:30
1 parent de86ccb3df
commit 2c439b3063
6 files changed
+112 -66

No files matched your search

+2 -4
View File
@@ -723,12 +723,10 @@ func (s *StreamAllocator) handleNewEstimateInNonProbe() {
}
var estimateToCommit int64
var packets, repeatedNacks uint32
var nackRatio float64
expectedBandwidthUsage := s.getExpectedBandwidthUsage()
packets, repeatedNacks, nackRatio := s.channelObserver.GetNackRatio()
switch reason {
case ChannelCongestionReasonLoss:
packets, repeatedNacks, nackRatio = s.channelObserver.GetNackRatio()
estimateToCommit = int64(float64(expectedBandwidthUsage) * (1.0 - NackRatioAttenuator*nackRatio))
default:
estimateToCommit = s.lastReceivedEstimate
@@ -1110,7 +1108,7 @@ func (s *StreamAllocator) initProbe(probeRateBps int64) {
"committed", s.committedChannelCapacity,
"lastReceived", s.lastReceivedEstimate,
"probeRateBps", probeRateBps,
"goalBps", expectedBandwidthUsage+probeRateBps,
"goalBps", s.probeGoalBps,
)
}