Merge pull request #14196 from sethalves/interstitial-domain-full

go to error-room when failing to connect to a full domain
This commit is contained in:
John Conklin II 2018-10-18 17:49:35 -07:00 committed by GitHub
commit 5095a4e0eb
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
2 changed files with 14 additions and 6 deletions

View file

@ -140,8 +140,10 @@ void DomainHandler::hardReset() {
}
bool DomainHandler::isHardRefusal(int reasonCode) {
return (reasonCode == (int)ConnectionRefusedReason::ProtocolMismatch || reasonCode == (int)ConnectionRefusedReason::NotAuthorized ||
reasonCode == (int)ConnectionRefusedReason::TimedOut);
return (reasonCode == (int)ConnectionRefusedReason::ProtocolMismatch ||
reasonCode == (int)ConnectionRefusedReason::TooManyUsers ||
reasonCode == (int)ConnectionRefusedReason::NotAuthorized ||
reasonCode == (int)ConnectionRefusedReason::TimedOut);
}
bool DomainHandler::getInterstitialModeEnabled() const {
@ -473,7 +475,7 @@ bool DomainHandler::reasonSuggestsLogin(ConnectionRefusedReason reasonCode) {
case ConnectionRefusedReason::LoginError:
case ConnectionRefusedReason::NotAuthorized:
return true;
default:
case ConnectionRefusedReason::Unknown:
case ConnectionRefusedReason::ProtocolMismatch:

View file

@ -5,14 +5,20 @@
"Oops! Protocol version mismatch.",
"Oops! Not authorized to join domain.",
"Oops! Connection timed out.",
"Oops! The domain is full.",
"Oops! Something went wrong."
];
var PROTOCOL_VERSION_MISMATCH = 1;
var NOT_AUTHORIZED = 3;
var DOMAIN_FULL = 4;
var TIMEOUT = 5;
var hardRefusalErrors = [PROTOCOL_VERSION_MISMATCH,
NOT_AUTHORIZED, TIMEOUT];
var hardRefusalErrors = [
PROTOCOL_VERSION_MISMATCH,
NOT_AUTHORIZED,
TIMEOUT,
DOMAIN_FULL
];
var timer = null;
var isErrorState = false;
@ -26,7 +32,7 @@
return ERROR_MESSAGE_MAP[errorMessageMapIndex];
} else {
// some other text.
return ERROR_MESSAGE_MAP[4];
return ERROR_MESSAGE_MAP[ERROR_MESSAGE_MAP.length - 1];
}
};