mirror of
https://github.com/PeernetOfficial/core.git
synced 2026-07-17 18:57:50 +01:00
Merge pull request #92 from PeernetOfficial/udt-nak-fix
added fix to nak interval
This commit is contained in:
@@ -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()
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user