mirror of
https://github.com/livekit/livekit.git
synced 2026-07-11 20:39:08 +00:00
Do not log due to negative getting interpreted as large unsigned positive (#4605)
This commit is contained in:
@@ -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")
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user