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