mirror of
https://github.com/overte-org/overte.git
synced 2025-04-25 08:17:11 +02:00
Revert "adding fix for getting DomainHandler into error state"
This reverts commit 3fe3f674d0
.
This commit is contained in:
parent
96ab7d417e
commit
873859455a
2 changed files with 7 additions and 13 deletions
|
@ -55,9 +55,6 @@ DomainHandler::DomainHandler(QObject* parent) :
|
||||||
|
|
||||||
// stop the refresh timer if we connect to a domain
|
// stop the refresh timer if we connect to a domain
|
||||||
connect(this, &DomainHandler::connectedToDomain, &_apiRefreshTimer, &QTimer::stop);
|
connect(this, &DomainHandler::connectedToDomain, &_apiRefreshTimer, &QTimer::stop);
|
||||||
|
|
||||||
// stop the refresh timer if we connect to a domain
|
|
||||||
connect(this, &DomainHandler::redirectToErrorDomainURL, &_apiRefreshTimer, &QTimer::stop);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
void DomainHandler::disconnect() {
|
void DomainHandler::disconnect() {
|
||||||
|
@ -102,6 +99,7 @@ void DomainHandler::softReset() {
|
||||||
|
|
||||||
clearSettings();
|
clearSettings();
|
||||||
|
|
||||||
|
_isInErrorState = false;
|
||||||
_connectionDenialsSinceKeypairRegen = 0;
|
_connectionDenialsSinceKeypairRegen = 0;
|
||||||
_checkInPacketsSinceLastReply = 0;
|
_checkInPacketsSinceLastReply = 0;
|
||||||
|
|
||||||
|
@ -109,14 +107,11 @@ void DomainHandler::softReset() {
|
||||||
QMetaObject::invokeMethod(&_settingsTimer, "stop");
|
QMetaObject::invokeMethod(&_settingsTimer, "stop");
|
||||||
|
|
||||||
// restart the API refresh timer in case we fail to connect and need to refresh information
|
// restart the API refresh timer in case we fail to connect and need to refresh information
|
||||||
if (!_isInErrorState)
|
QMetaObject::invokeMethod(&_apiRefreshTimer, "start");
|
||||||
QMetaObject::invokeMethod(&_apiRefreshTimer, "start");
|
|
||||||
_isInErrorState = false;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
void DomainHandler::hardReset() {
|
void DomainHandler::hardReset() {
|
||||||
if (!_isInErrorState)
|
emit resetting();
|
||||||
emit resetting();
|
|
||||||
|
|
||||||
softReset();
|
softReset();
|
||||||
|
|
||||||
|
@ -343,7 +338,6 @@ void DomainHandler::loadedErrorDomain(std::map<QString, QString> namedPaths) {
|
||||||
void DomainHandler::setRedirectErrorState(QUrl errorUrl, int reasonCode) {
|
void DomainHandler::setRedirectErrorState(QUrl errorUrl, int reasonCode) {
|
||||||
_errorDomainURL = errorUrl;
|
_errorDomainURL = errorUrl;
|
||||||
_lastDomainConnectionError = reasonCode;
|
_lastDomainConnectionError = reasonCode;
|
||||||
_isInErrorState = true;
|
|
||||||
emit redirectToErrorDomainURL(_errorDomainURL);
|
emit redirectToErrorDomainURL(_errorDomainURL);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -486,8 +480,9 @@ void DomainHandler::processDomainServerConnectionDeniedPacket(QSharedPointer<Rec
|
||||||
emit domainConnectionRefused(reasonMessage, (int)reasonCode, extraInfo);
|
emit domainConnectionRefused(reasonMessage, (int)reasonCode, extraInfo);
|
||||||
#else
|
#else
|
||||||
if (reasonCode == ConnectionRefusedReason::ProtocolMismatch || reasonCode == ConnectionRefusedReason::NotAuthorized) {
|
if (reasonCode == ConnectionRefusedReason::ProtocolMismatch || reasonCode == ConnectionRefusedReason::NotAuthorized) {
|
||||||
|
_isInErrorState = true;
|
||||||
// ingest the error - this is a "hard" connection refusal.
|
// ingest the error - this is a "hard" connection refusal.
|
||||||
setRedirectErrorState(_errorDomainURL, (int)reasonCode);
|
emit redirectToErrorDomainURL(_errorDomainURL);
|
||||||
} else {
|
} else {
|
||||||
emit domainConnectionRefused(reasonMessage, (int)reasonCode, extraInfo);
|
emit domainConnectionRefused(reasonMessage, (int)reasonCode, extraInfo);
|
||||||
}
|
}
|
||||||
|
|
|
@ -87,6 +87,8 @@ public:
|
||||||
void connectedToServerless(std::map<QString, QString> namedPaths);
|
void connectedToServerless(std::map<QString, QString> namedPaths);
|
||||||
|
|
||||||
void loadedErrorDomain(std::map<QString, QString> namedPaths);
|
void loadedErrorDomain(std::map<QString, QString> namedPaths);
|
||||||
|
// sets domain handler in error state.
|
||||||
|
void setRedirectErrorState(QUrl errorUrl, int reasonCode);
|
||||||
|
|
||||||
QString getViewPointFromNamedPath(QString namedPath);
|
QString getViewPointFromNamedPath(QString namedPath);
|
||||||
|
|
||||||
|
@ -170,9 +172,6 @@ public slots:
|
||||||
void processICEResponsePacket(QSharedPointer<ReceivedMessage> icePacket);
|
void processICEResponsePacket(QSharedPointer<ReceivedMessage> icePacket);
|
||||||
void processDomainServerConnectionDeniedPacket(QSharedPointer<ReceivedMessage> message);
|
void processDomainServerConnectionDeniedPacket(QSharedPointer<ReceivedMessage> message);
|
||||||
|
|
||||||
// sets domain handler in error state.
|
|
||||||
void setRedirectErrorState(QUrl errorUrl, int reasonCode);
|
|
||||||
|
|
||||||
private slots:
|
private slots:
|
||||||
void completedHostnameLookup(const QHostInfo& hostInfo);
|
void completedHostnameLookup(const QHostInfo& hostInfo);
|
||||||
void completedIceServerHostnameLookup();
|
void completedIceServerHostnameLookup();
|
||||||
|
|
Loading…
Reference in a new issue