diff --git a/domain-server/CMakeLists.txt b/domain-server/CMakeLists.txt index 9090a1b637..b804ff27d3 100644 --- a/domain-server/CMakeLists.txt +++ b/domain-server/CMakeLists.txt @@ -44,7 +44,7 @@ find_package(OpenSSL REQUIRED) if (APPLE AND ${OPENSSL_INCLUDE_DIR} STREQUAL "/usr/include") # this is a user on OS X using system OpenSSL, which is going to throw warnings since they're deprecating for their common crypto message(WARNING "The found version of OpenSSL is the OS X system version. This will produce deprecation warnings." - "\nWe recommend you install a newer version (at least 1.0.1h) in a different directory and set OPENSSL_ROOT_DIR in your env so Cmake can find it.") + "\nWe recommend you install a newer version (at least 1.0.1h) in a different directory and set OPENSSL_ROOT_DIR in your env so Cmake can find it.") endif () include_directories(SYSTEM "${OPENSSL_INCLUDE_DIR}") diff --git a/libraries/networking/CMakeLists.txt b/libraries/networking/CMakeLists.txt index e4dd37234b..50f41fe643 100644 --- a/libraries/networking/CMakeLists.txt +++ b/libraries/networking/CMakeLists.txt @@ -16,7 +16,7 @@ find_package(OpenSSL REQUIRED) if (APPLE AND ${OPENSSL_INCLUDE_DIR} STREQUAL "/usr/include") # this is a user on OS X using system OpenSSL, which is going to throw warnings since they're deprecating for their common crypto message(WARNING "The found version of OpenSSL is the OS X system version. This will produce deprecation warnings." - "\nWe recommend you install a newer version (at least 1.0.1h) in a different directory and set OPENSSL_ROOT_DIR in your env so Cmake can find it.") + "\nWe recommend you install a newer version (at least 1.0.1h) in a different directory and set OPENSSL_ROOT_DIR in your env so Cmake can find it.") endif () include_directories(SYSTEM "${OPENSSL_INCLUDE_DIR}") diff --git a/libraries/networking/src/DomainHandler.cpp b/libraries/networking/src/DomainHandler.cpp index 760c9f4c04..81d6a6d662 100644 --- a/libraries/networking/src/DomainHandler.cpp +++ b/libraries/networking/src/DomainHandler.cpp @@ -47,9 +47,7 @@ void DomainHandler::clearConnectionInfo() { _sockAddr.setAddress(QHostAddress::Null); } - _isConnected = false; - - emit disconnectedFromDomain(); + setIsConnected(false); if (_handshakeTimer) { _handshakeTimer->stop(); @@ -64,12 +62,15 @@ void DomainHandler::clearSettings() { } void DomainHandler::softReset() { + qDebug() << "Resetting current domain connection information."; clearConnectionInfo(); clearSettings(); } void DomainHandler::hardReset() { softReset(); + + qDebug() << "Hard reset in NodeList DomainHandler."; _iceDomainID = QUuid(); _hostname = QString(); _sockAddr.setAddress(QHostAddress::Null); diff --git a/libraries/networking/src/NodeList.cpp b/libraries/networking/src/NodeList.cpp index f8da7cdbfa..feeb13500a 100644 --- a/libraries/networking/src/NodeList.cpp +++ b/libraries/networking/src/NodeList.cpp @@ -62,7 +62,7 @@ NodeList::NodeList(char newOwnerType, unsigned short socketListenPort, unsigned _stunRequestsSinceSuccess(0) { // clear our NodeList when the domain changes - connect(&_domainHandler, &DomainHandler::hostnameChanged, this, &NodeList::reset); + connect(&_domainHandler, &DomainHandler::disconnectedFromDomain, this, &NodeList::reset); // handle ICE signal from DS so connection is attempted immediately connect(&_domainHandler, &DomainHandler::requestICEConnectionAttempt, this, &NodeList::handleICEConnectionToDomainServer); @@ -205,8 +205,10 @@ void NodeList::reset() { // refresh the owner UUID to the NULL UUID setSessionUUID(QUuid()); - // clear the domain connection information - _domainHandler.softReset(); + if (sender() != &_domainHandler) { + // clear the domain connection information, unless they're the ones that asked us to reset + _domainHandler.softReset(); + } // if we setup the DTLS socket, also disconnect from the DTLS socket readyRead() so it can handle handshaking if (_dtlsSocket) { @@ -332,7 +334,7 @@ void NodeList::sendDomainServerCheckIn() { if (_numNoReplyDomainCheckIns >= MAX_SILENT_DOMAIN_SERVER_CHECK_INS) { // we haven't heard back from DS in MAX_SILENT_DOMAIN_SERVER_CHECK_INS - // so emit our signal that indicates that + // so emit our signal that says that emit limitOfSilentDomainCheckInsReached(); }