From 74d6e5ba890186c904a767974f09f0e98bcef938 Mon Sep 17 00:00:00 2001 From: Stephen Birarda Date: Thu, 20 Aug 2015 10:01:12 -0700 Subject: [PATCH] make sure LNL goes down before domain-server --- domain-server/src/DomainServer.cpp | 5 +++++ domain-server/src/DomainServer.h | 3 ++- libraries/networking/src/udt/Connection.cpp | 3 ++- 3 files changed, 9 insertions(+), 2 deletions(-) diff --git a/domain-server/src/DomainServer.cpp b/domain-server/src/DomainServer.cpp index ddbef90ef6..410b58d17f 100644 --- a/domain-server/src/DomainServer.cpp +++ b/domain-server/src/DomainServer.cpp @@ -110,6 +110,11 @@ DomainServer::DomainServer(int argc, char* argv[]) : } } +DomainServer::~DomainServer() { + // destroy the LimitedNodeList before the DomainServer QCoreApplication is down + DependencyManager::destroy(); +} + void DomainServer::aboutToQuit() { // clear the log handler so that Qt doesn't call the destructor on LogHandler diff --git a/domain-server/src/DomainServer.h b/domain-server/src/DomainServer.h index 7495e080de..c39633f62a 100644 --- a/domain-server/src/DomainServer.h +++ b/domain-server/src/DomainServer.h @@ -38,7 +38,8 @@ class DomainServer : public QCoreApplication, public HTTPSRequestHandler { Q_OBJECT public: DomainServer(int argc, char* argv[]); - + ~DomainServer(); + static int const EXIT_CODE_REBOOT; bool handleHTTPRequest(HTTPConnection* connection, const QUrl& url, bool skipSubHandler = false); diff --git a/libraries/networking/src/udt/Connection.cpp b/libraries/networking/src/udt/Connection.cpp index 85c3dbcbda..9f8b1eb3ee 100644 --- a/libraries/networking/src/udt/Connection.cpp +++ b/libraries/networking/src/udt/Connection.cpp @@ -58,7 +58,8 @@ Connection::~Connection() { _sendQueue->deleteLater(); _sendQueue.release(); - // wait on the send queue thread so we know the send queue is gone + // wait on the send queue thread so we know the send queue is gone + sendQueueThread->quit(); sendQueueThread->wait(); } }