mirror of
https://github.com/overte-org/overte.git
synced 2025-08-07 16:30:39 +02:00
wait on the SendQueue thread in Connection
This commit is contained in:
parent
4e540828bd
commit
426a8909e1
1 changed files with 7 additions and 0 deletions
|
@ -47,9 +47,16 @@ Connection::Connection(Socket* parentSocket, HifiSockAddr destination, std::uniq
|
||||||
|
|
||||||
Connection::~Connection() {
|
Connection::~Connection() {
|
||||||
if (_sendQueue) {
|
if (_sendQueue) {
|
||||||
|
// grab the send queue thread so we can wait on it
|
||||||
|
QThread* sendQueueThread = _sendQueue->thread();
|
||||||
|
|
||||||
|
// tell the send queue to stop and be deleted
|
||||||
_sendQueue->stop();
|
_sendQueue->stop();
|
||||||
_sendQueue->deleteLater();
|
_sendQueue->deleteLater();
|
||||||
_sendQueue.release();
|
_sendQueue.release();
|
||||||
|
|
||||||
|
// wait on the send queue thread so we know the send queue is gone
|
||||||
|
sendQueueThread->wait();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue