mirror of
https://github.com/overte-org/overte.git
synced 2025-04-20 03:24:00 +02:00
add distinction between hard reset and soft reset for DomainHandler
This commit is contained in:
parent
adcf45583e
commit
8986e62b8a
3 changed files with 11 additions and 6 deletions
|
@ -49,9 +49,13 @@ void DomainHandler::clearSettings() {
|
|||
_failedSettingsRequests = 0;
|
||||
}
|
||||
|
||||
void DomainHandler::reset() {
|
||||
void DomainHandler::softReset() {
|
||||
clearConnectionInfo();
|
||||
clearSettings();
|
||||
}
|
||||
|
||||
void DomainHandler::hardReset() {
|
||||
softReset();
|
||||
_hostname = QString();
|
||||
_sockAddr.setAddress(QHostAddress::Null);
|
||||
}
|
||||
|
@ -59,7 +63,7 @@ void DomainHandler::reset() {
|
|||
void DomainHandler::setSockAddr(const HifiSockAddr& sockAddr, const QString& hostname) {
|
||||
if (_sockAddr != sockAddr) {
|
||||
// we should reset on a sockAddr change
|
||||
reset();
|
||||
hardReset();
|
||||
// change the sockAddr
|
||||
_sockAddr = sockAddr;
|
||||
}
|
||||
|
@ -72,7 +76,7 @@ void DomainHandler::setHostname(const QString& hostname) {
|
|||
|
||||
if (hostname != _hostname) {
|
||||
// re-set the domain info so that auth information is reloaded
|
||||
reset();
|
||||
hardReset();
|
||||
|
||||
int colonIndex = hostname.indexOf(':');
|
||||
|
||||
|
|
|
@ -62,6 +62,8 @@ public:
|
|||
|
||||
void parseDTLSRequirementPacket(const QByteArray& dtlsRequirementPacket);
|
||||
|
||||
void softReset();
|
||||
|
||||
private slots:
|
||||
void completedHostnameLookup(const QHostInfo& hostInfo);
|
||||
void settingsRequestFinished();
|
||||
|
@ -73,7 +75,7 @@ signals:
|
|||
void settingsReceiveFail();
|
||||
|
||||
private:
|
||||
void reset();
|
||||
void hardReset();
|
||||
|
||||
QUuid _uuid;
|
||||
QString _hostname;
|
||||
|
|
|
@ -178,8 +178,7 @@ void NodeList::reset() {
|
|||
setSessionUUID(QUuid());
|
||||
|
||||
// clear the domain connection information
|
||||
_domainHandler.clearConnectionInfo();
|
||||
_domainHandler.clearSettings();
|
||||
_domainHandler.softReset();
|
||||
|
||||
// if we setup the DTLS socket, also disconnect from the DTLS socket readyRead() so it can handle handshaking
|
||||
if (_dtlsSocket) {
|
||||
|
|
Loading…
Reference in a new issue