Staticcheck (#464)

Using `go get -u honnef.co/go/tools/cmd/staticcheck`
Uneaarthed a couple of real bugs
This commit is contained in:
Raja Subramanian
2022-02-25 12:04:08 +05:30
committed by GitHub
parent 5a4181b581
commit 0170cc1cb6
19 changed files with 32 additions and 41 deletions
+1 -1
View File
@@ -120,7 +120,7 @@ func (cs *ConnectionStats) updateScore() float32 {
maxRTT := uint32(0)
maxJitter := uint32(0)
for _, qw := range cs.qualityWindows {
expectedPacketsInInterval += qw.endSeqNum - qw.endSeqNum + 1
expectedPacketsInInterval += qw.endSeqNum - qw.startSeqNum + 1
lostPacketsInInterval += qw.endPacketsLost - qw.startPacketsLost
if qw.maxRTT > maxRTT {
maxRTT = qw.maxRTT