mirror of
https://github.com/overte-org/overte.git
synced 2025-08-09 09:28:46 +02:00
repairs to domain change reset to clear nodes
This commit is contained in:
parent
e72b86059e
commit
7cb8cbfdd4
2 changed files with 10 additions and 7 deletions
|
@ -47,9 +47,7 @@ void DomainHandler::clearConnectionInfo() {
|
||||||
_sockAddr.setAddress(QHostAddress::Null);
|
_sockAddr.setAddress(QHostAddress::Null);
|
||||||
}
|
}
|
||||||
|
|
||||||
_isConnected = false;
|
setIsConnected(false);
|
||||||
|
|
||||||
emit disconnectedFromDomain();
|
|
||||||
|
|
||||||
if (_handshakeTimer) {
|
if (_handshakeTimer) {
|
||||||
_handshakeTimer->stop();
|
_handshakeTimer->stop();
|
||||||
|
@ -64,12 +62,15 @@ void DomainHandler::clearSettings() {
|
||||||
}
|
}
|
||||||
|
|
||||||
void DomainHandler::softReset() {
|
void DomainHandler::softReset() {
|
||||||
|
qDebug() << "Resetting current domain connection information.";
|
||||||
clearConnectionInfo();
|
clearConnectionInfo();
|
||||||
clearSettings();
|
clearSettings();
|
||||||
}
|
}
|
||||||
|
|
||||||
void DomainHandler::hardReset() {
|
void DomainHandler::hardReset() {
|
||||||
softReset();
|
softReset();
|
||||||
|
|
||||||
|
qDebug() << "Hard reset in NodeList DomainHandler.";
|
||||||
_iceDomainID = QUuid();
|
_iceDomainID = QUuid();
|
||||||
_hostname = QString();
|
_hostname = QString();
|
||||||
_sockAddr.setAddress(QHostAddress::Null);
|
_sockAddr.setAddress(QHostAddress::Null);
|
||||||
|
|
|
@ -62,7 +62,7 @@ NodeList::NodeList(char newOwnerType, unsigned short socketListenPort, unsigned
|
||||||
_stunRequestsSinceSuccess(0)
|
_stunRequestsSinceSuccess(0)
|
||||||
{
|
{
|
||||||
// clear our NodeList when the domain changes
|
// 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
|
// handle ICE signal from DS so connection is attempted immediately
|
||||||
connect(&_domainHandler, &DomainHandler::requestICEConnectionAttempt, this, &NodeList::handleICEConnectionToDomainServer);
|
connect(&_domainHandler, &DomainHandler::requestICEConnectionAttempt, this, &NodeList::handleICEConnectionToDomainServer);
|
||||||
|
@ -205,8 +205,10 @@ void NodeList::reset() {
|
||||||
// refresh the owner UUID to the NULL UUID
|
// refresh the owner UUID to the NULL UUID
|
||||||
setSessionUUID(QUuid());
|
setSessionUUID(QUuid());
|
||||||
|
|
||||||
// clear the domain connection information
|
if (sender() != &_domainHandler) {
|
||||||
_domainHandler.softReset();
|
// 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 we setup the DTLS socket, also disconnect from the DTLS socket readyRead() so it can handle handshaking
|
||||||
if (_dtlsSocket) {
|
if (_dtlsSocket) {
|
||||||
|
@ -332,7 +334,7 @@ void NodeList::sendDomainServerCheckIn() {
|
||||||
|
|
||||||
if (_numNoReplyDomainCheckIns >= MAX_SILENT_DOMAIN_SERVER_CHECK_INS) {
|
if (_numNoReplyDomainCheckIns >= MAX_SILENT_DOMAIN_SERVER_CHECK_INS) {
|
||||||
// we haven't heard back from DS in 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();
|
emit limitOfSilentDomainCheckInsReached();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue