mirror of
https://github.com/HifiExperiments/overte.git
synced 2025-08-09 11:39:41 +02:00
make sure NAKs is empty before append from timeout
This commit is contained in:
parent
4fe9ad94f5
commit
24fd39dfa3
1 changed files with 2 additions and 2 deletions
|
@ -510,12 +510,12 @@ bool SendQueue::isInactive(bool sentAPacket) {
|
||||||
auto cvStatus = _emptyCondition.wait_for(locker, waitDuration);
|
auto cvStatus = _emptyCondition.wait_for(locker, waitDuration);
|
||||||
|
|
||||||
if (cvStatus == std::cv_status::timeout) {
|
if (cvStatus == std::cv_status::timeout) {
|
||||||
if (SequenceNumber(_lastACKSequenceNumber) < _currentSequenceNumber) {
|
if (_naks.isEmpty() && SequenceNumber(_lastACKSequenceNumber) < _currentSequenceNumber) {
|
||||||
// after a timeout if we still have sent packets that the client hasn't ACKed we
|
// after a timeout if we still have sent packets that the client hasn't ACKed we
|
||||||
// add them to the loss list
|
// add them to the loss list
|
||||||
|
|
||||||
// Note that thanks to the DoubleLock we have the _naksLock right now
|
// Note that thanks to the DoubleLock we have the _naksLock right now
|
||||||
_naks.insert(SequenceNumber(_lastACKSequenceNumber) + 1, _currentSequenceNumber);
|
_naks.append(SequenceNumber(_lastACKSequenceNumber) + 1, _currentSequenceNumber);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue