mirror of
https://github.com/lubosz/overte.git
synced 2025-04-23 09:25:31 +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() {
|
||||
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->deleteLater();
|
||||
_sendQueue.release();
|
||||
|
||||
// wait on the send queue thread so we know the send queue is gone
|
||||
sendQueueThread->wait();
|
||||
}
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in a new issue