mirror of
https://github.com/PeernetOfficial/core.git
synced 2026-07-22 20:57:50 +01:00
UDT: Fix divide by zero.
This commit is contained in:
@@ -179,7 +179,7 @@ func (ncc NativeCongestionControl) OnNAK(parms CongestionControlParms, losslist
|
|||||||
} else {
|
} else {
|
||||||
if ncc.decCount < 5 {
|
if ncc.decCount < 5 {
|
||||||
ncc.nakCount++
|
ncc.nakCount++
|
||||||
if ncc.nakCount%ncc.decRandom != 0 {
|
if ncc.decRandom != 0 && ncc.nakCount%ncc.decRandom != 0 {
|
||||||
ncc.decCount++
|
ncc.decCount++
|
||||||
return
|
return
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user