Limit special config request types.

This commit is contained in:
John Preston
2023-01-10 15:03:37 +04:00
parent 05911a7172
commit 1176421bf2
4 changed files with 25 additions and 14 deletions
@@ -116,7 +116,7 @@ void ConfigLoader::enumerate() {
}
void ConfigLoader::refreshSpecialLoader() {
if (_proxyEnabled) {
if (_proxyEnabled || _instance->isKeysDestroyer()) {
_specialLoader.reset();
return;
}
@@ -136,6 +136,7 @@ void ConfigLoader::setPhone(const QString &phone) {
}
void ConfigLoader::createSpecialLoader() {
const auto testMode = _instance->isTestMode();
_triedSpecialEndpoints.clear();
_specialLoader = std::make_unique<SpecialConfigRequest>([=](
DcId dcId,
@@ -147,7 +148,7 @@ void ConfigLoader::createSpecialLoader() {
} else {
addSpecialEndpoint(dcId, ip, port, secret);
}
}, _instance->configValues().txtDomainString, _phone);
}, testMode, _instance->configValues().txtDomainString, _phone);
}
void ConfigLoader::addSpecialEndpoint(