mirror of
https://github.com/overte-org/overte.git
synced 2025-08-10 12:42:58 +02:00
unlock before de-activating the queue
This commit is contained in:
parent
c65ab5f1ad
commit
8e97a50957
1 changed files with 4 additions and 3 deletions
|
@ -482,9 +482,6 @@ bool SendQueue::isInactive(bool sentAPacket) {
|
||||||
// use our condition_variable_any to wait
|
// use our condition_variable_any to wait
|
||||||
auto cvStatus = _emptyCondition.wait_for(locker, EMPTY_QUEUES_INACTIVE_TIMEOUT);
|
auto cvStatus = _emptyCondition.wait_for(locker, EMPTY_QUEUES_INACTIVE_TIMEOUT);
|
||||||
|
|
||||||
// we have the lock again - Make sure to unlock it
|
|
||||||
locker.unlock();
|
|
||||||
|
|
||||||
if (cvStatus == std::cv_status::timeout && (_packets.isEmpty() || isFlowWindowFull()) && _naks.isEmpty()) {
|
if (cvStatus == std::cv_status::timeout && (_packets.isEmpty() || isFlowWindowFull()) && _naks.isEmpty()) {
|
||||||
#ifdef UDT_CONNECTION_DEBUG
|
#ifdef UDT_CONNECTION_DEBUG
|
||||||
qCDebug(networking) << "SendQueue to" << _destination << "has been empty for"
|
qCDebug(networking) << "SendQueue to" << _destination << "has been empty for"
|
||||||
|
@ -492,11 +489,15 @@ bool SendQueue::isInactive(bool sentAPacket) {
|
||||||
<< "seconds and receiver has ACKed all packets."
|
<< "seconds and receiver has ACKed all packets."
|
||||||
<< "The queue is now inactive and will be stopped.";
|
<< "The queue is now inactive and will be stopped.";
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
// we have the lock again - Make sure to unlock it
|
||||||
|
locker.unlock();
|
||||||
|
|
||||||
// Deactivate queue
|
// Deactivate queue
|
||||||
deactivate();
|
deactivate();
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
|
||||||
} else {
|
} else {
|
||||||
// We think the client is still waiting for data (based on the sequence number gap)
|
// We think the client is still waiting for data (based on the sequence number gap)
|
||||||
// Let's wait either for a response from the client or until the estimated timeout
|
// Let's wait either for a response from the client or until the estimated timeout
|
||||||
|
|
Loading…
Reference in a new issue