mirror of
https://github.com/overte-org/overte.git
synced 2025-04-20 04:44:11 +02:00
check for hard refusal to 404
This commit is contained in:
parent
eab57633a5
commit
5f05be554f
2 changed files with 8 additions and 1 deletions
|
@ -139,6 +139,11 @@ void DomainHandler::hardReset() {
|
|||
_pendingPath.clear();
|
||||
}
|
||||
|
||||
bool DomainHandler::isHardRefusal(int reasonCode) {
|
||||
return (reasonCode == (int)ConnectionRefusedReason::ProtocolMismatch || reasonCode == (int)ConnectionRefusedReason::NotAuthorized ||
|
||||
reasonCode == (int)ConnectionRefusedReason::TimedOut);
|
||||
}
|
||||
|
||||
bool DomainHandler::getInterstitialModeEnabled() const {
|
||||
return _interstitialModeSettingLock.resultWithReadLock<bool>([&] {
|
||||
return _enableInterstitialMode.get();
|
||||
|
@ -360,7 +365,7 @@ void DomainHandler::loadedErrorDomain(std::map<QString, QString> namedPaths) {
|
|||
|
||||
void DomainHandler::setRedirectErrorState(QUrl errorUrl, QString reasonMessage, int reasonCode, const QString& extraInfo) {
|
||||
_lastDomainConnectionError = reasonCode;
|
||||
if (getInterstitialModeEnabled()) {
|
||||
if (getInterstitialModeEnabled() && isHardRefusal(reasonCode)) {
|
||||
_errorDomainURL = errorUrl;
|
||||
_isInErrorState = true;
|
||||
qCDebug(networking) << "Error connecting to domain: " << reasonMessage;
|
||||
|
|
|
@ -212,6 +212,8 @@ private:
|
|||
void sendDisconnectPacket();
|
||||
void hardReset();
|
||||
|
||||
bool isHardRefusal(int reasonCode);
|
||||
|
||||
QUuid _uuid;
|
||||
Node::LocalID _localID;
|
||||
QUrl _domainURL;
|
||||
|
|
Loading…
Reference in a new issue