Merge pull request #92 from PeernetOfficial/udt-nak-fix

added fix to nak interval
This commit is contained in:
Peter Kleissner
2022-02-21 00:31:59 +01:00
committed by GitHub

View File

@@ -87,7 +87,6 @@ func (ncc *NativeCongestionControl) OnACK(parms CongestionControlParms, ack pack
}
if ncc.loss {
ncc.loss = false
parms.SetCongestionWindowSize(cWndSize)
return
}
/*
@@ -189,14 +188,12 @@ func (ncc *NativeCongestionControl) OnNAK(parms CongestionControlParms, losslist
ncc.nakCount++
if ncc.decRandom != 0 && ncc.nakCount%ncc.decRandom != 0 {
ncc.decCount++
// 0.875^5 = 0.51, rate should not be decreased by more than half within a congestion period
parms.SetPacketSendPeriod(pktSendPeriod * 1125 / 1000)
ncc.lastDecSeq = parms.GetSndCurrSeqNo()
return
}
}
ncc.decCount++
// 0.875^5 = 0.51, rate should not be decreased by more than half within a congestion period
parms.SetPacketSendPeriod(pktSendPeriod * 1125 / 1000)
ncc.lastDecSeq = parms.GetSndCurrSeqNo()
}
}