Do not log due to negative getting interpreted as large unsigned positive (#4605)

This commit is contained in:
Raja Subramanian
2026-06-18 20:08:52 +05:30
committed by GitHub
parent 35b5390c27
commit 9a7fe3cc68
+5 -1
View File
@@ -482,7 +482,11 @@ func (q *qualityScorer) updateAtLocked(stat *windowStat, at time.Time) {
ulgr.Debugw("quality rise")
default:
packets := stat.packets + stat.packetsPadding
if packets != 0 && ((stat.packetsLost-stat.packetsMissing-stat.packetsOutOfOrder)*100/packets) > 10 {
lost := stat.packetsLost - stat.packetsMissing - stat.packetsOutOfOrder
if int32(lost) < 0 {
lost = 0
}
if packets != 0 && lost*100/packets > 10 {
ulgr.Debugw("quality hold - high loss")
}
}