mirror of
https://github.com/HifiExperiments/overte.git
synced 2025-06-01 05:32:24 +02:00
go to error-room when failing to connect to a full domain
This commit is contained in:
parent
b31af8c9c6
commit
47d3c9ba27
2 changed files with 14 additions and 6 deletions
|
@ -140,8 +140,10 @@ void DomainHandler::hardReset() {
|
||||||
}
|
}
|
||||||
|
|
||||||
bool DomainHandler::isHardRefusal(int reasonCode) {
|
bool DomainHandler::isHardRefusal(int reasonCode) {
|
||||||
return (reasonCode == (int)ConnectionRefusedReason::ProtocolMismatch || reasonCode == (int)ConnectionRefusedReason::NotAuthorized ||
|
return (reasonCode == (int)ConnectionRefusedReason::ProtocolMismatch ||
|
||||||
reasonCode == (int)ConnectionRefusedReason::TimedOut);
|
reasonCode == (int)ConnectionRefusedReason::TooManyUsers ||
|
||||||
|
reasonCode == (int)ConnectionRefusedReason::NotAuthorized ||
|
||||||
|
reasonCode == (int)ConnectionRefusedReason::TimedOut);
|
||||||
}
|
}
|
||||||
|
|
||||||
bool DomainHandler::getInterstitialModeEnabled() const {
|
bool DomainHandler::getInterstitialModeEnabled() const {
|
||||||
|
@ -473,7 +475,7 @@ bool DomainHandler::reasonSuggestsLogin(ConnectionRefusedReason reasonCode) {
|
||||||
case ConnectionRefusedReason::LoginError:
|
case ConnectionRefusedReason::LoginError:
|
||||||
case ConnectionRefusedReason::NotAuthorized:
|
case ConnectionRefusedReason::NotAuthorized:
|
||||||
return true;
|
return true;
|
||||||
|
|
||||||
default:
|
default:
|
||||||
case ConnectionRefusedReason::Unknown:
|
case ConnectionRefusedReason::Unknown:
|
||||||
case ConnectionRefusedReason::ProtocolMismatch:
|
case ConnectionRefusedReason::ProtocolMismatch:
|
||||||
|
|
|
@ -5,14 +5,20 @@
|
||||||
"Oops! Protocol version mismatch.",
|
"Oops! Protocol version mismatch.",
|
||||||
"Oops! Not authorized to join domain.",
|
"Oops! Not authorized to join domain.",
|
||||||
"Oops! Connection timed out.",
|
"Oops! Connection timed out.",
|
||||||
|
"Oops! The domain is full.",
|
||||||
"Oops! Something went wrong."
|
"Oops! Something went wrong."
|
||||||
];
|
];
|
||||||
|
|
||||||
var PROTOCOL_VERSION_MISMATCH = 1;
|
var PROTOCOL_VERSION_MISMATCH = 1;
|
||||||
var NOT_AUTHORIZED = 3;
|
var NOT_AUTHORIZED = 3;
|
||||||
|
var DOMAIN_FULL = 4;
|
||||||
var TIMEOUT = 5;
|
var TIMEOUT = 5;
|
||||||
var hardRefusalErrors = [PROTOCOL_VERSION_MISMATCH,
|
var hardRefusalErrors = [
|
||||||
NOT_AUTHORIZED, TIMEOUT];
|
PROTOCOL_VERSION_MISMATCH,
|
||||||
|
NOT_AUTHORIZED,
|
||||||
|
TIMEOUT,
|
||||||
|
DOMAIN_FULL
|
||||||
|
];
|
||||||
var timer = null;
|
var timer = null;
|
||||||
var isErrorState = false;
|
var isErrorState = false;
|
||||||
|
|
||||||
|
@ -26,7 +32,7 @@
|
||||||
return ERROR_MESSAGE_MAP[errorMessageMapIndex];
|
return ERROR_MESSAGE_MAP[errorMessageMapIndex];
|
||||||
} else {
|
} else {
|
||||||
// some other text.
|
// some other text.
|
||||||
return ERROR_MESSAGE_MAP[4];
|
return ERROR_MESSAGE_MAP[ERROR_MESSAGE_MAP.length - 1];
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue