mirror of
https://github.com/overte-org/overte.git
synced 2025-08-08 22:56:54 +02:00
revert to domain connection refusal check with string
This commit is contained in:
parent
a48cce2975
commit
7307bc6a1b
2 changed files with 4 additions and 20 deletions
|
@ -407,25 +407,9 @@ void DomainHandler::processDomainServerConnectionDeniedPacket(QSharedPointer<Rec
|
||||||
// and check and signal for an access token so that we can make sure they are logged in
|
// and check and signal for an access token so that we can make sure they are logged in
|
||||||
qCWarning(networking) << "The domain-server denied a connection request: " << reasonMessage;
|
qCWarning(networking) << "The domain-server denied a connection request: " << reasonMessage;
|
||||||
|
|
||||||
if (!_domainConnectionRefusals.contains(reasonCode)) {
|
if (!_domainConnectionRefusals.contains(reasonMessage)) {
|
||||||
|
_domainConnectionRefusals.append(reasonMessage);
|
||||||
_domainConnectionRefusals.append(reasonCode);
|
emit domainConnectionRefused(reasonMessage, (int)reasonCode);
|
||||||
|
|
||||||
bool shouldSignal = true;
|
|
||||||
|
|
||||||
// only signal once for a protocol mismatch, even between soft resets that will reset the _domainConnectionRefusals
|
|
||||||
if (reasonCode == ConnectionRefusedReason::ProtocolMismatch) {
|
|
||||||
if (_hasSignalledProtocolMismatch) {
|
|
||||||
shouldSignal = false;
|
|
||||||
} else {
|
|
||||||
_hasSignalledProtocolMismatch = true;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
if (shouldSignal) {
|
|
||||||
emit domainConnectionRefused(reasonMessage, (int)reasonCode);
|
|
||||||
}
|
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
auto accountManager = DependencyManager::get<AccountManager>();
|
auto accountManager = DependencyManager::get<AccountManager>();
|
||||||
|
|
|
@ -144,7 +144,7 @@ private:
|
||||||
QString _pendingPath;
|
QString _pendingPath;
|
||||||
QTimer _settingsTimer;
|
QTimer _settingsTimer;
|
||||||
|
|
||||||
QList<ConnectionRefusedReason> _domainConnectionRefusals;
|
QStringList _domainConnectionRefusals;
|
||||||
bool _hasSignalledProtocolMismatch { false };
|
bool _hasSignalledProtocolMismatch { false };
|
||||||
bool _hasCheckedForAccessToken { false };
|
bool _hasCheckedForAccessToken { false };
|
||||||
int _connectionDenialsSinceKeypairRegen { 0 };
|
int _connectionDenialsSinceKeypairRegen { 0 };
|
||||||
|
|
Loading…
Reference in a new issue