mirror of
https://github.com/overte-org/overte.git
synced 2025-04-22 03:04:33 +02:00
Protect against lost counter underflow in networking stats
This commit is contained in:
parent
8faff57033
commit
0b472a9f02
1 changed files with 4 additions and 2 deletions
|
@ -142,8 +142,10 @@ SequenceNumberStats::ArrivalInfo SequenceNumberStats::sequenceNumberReceived(qui
|
|||
if (wantExtraDebugging) {
|
||||
qCDebug(networking) << "found it in _missingSet";
|
||||
}
|
||||
_stats._lost--;
|
||||
_stats._recovered++;
|
||||
if (_stats._lost > 0) {
|
||||
_stats._lost--;
|
||||
_stats._recovered++;
|
||||
}
|
||||
} else {
|
||||
// this late seq num is not in our missing set. it is possibly a duplicate, or possibly a late
|
||||
// packet that should have arrived before our first received packet. we'll count these
|
||||
|
|
Loading…
Reference in a new issue