mirror of
https://github.com/JulianGro/overte.git
synced 2025-04-25 19:55:07 +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);
|
||||
}
|
||||
|
||||
_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);
|
||||
|
|
|
@ -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();
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in a new issue