mirror of https://github.com/procxx/kepka.git
Don't try to logout CDN dcs.
This commit is contained in:
parent
66b7b6da2a
commit
96f7c0c02e
|
@ -1358,13 +1358,17 @@ internal::Session *Instance::Private::getSession(ShiftedDcId shiftedDcId) {
|
||||||
void Instance::Private::scheduleKeyDestroy(ShiftedDcId shiftedDcId) {
|
void Instance::Private::scheduleKeyDestroy(ShiftedDcId shiftedDcId) {
|
||||||
Expects(isKeysDestroyer());
|
Expects(isKeysDestroyer());
|
||||||
|
|
||||||
_instance->send(MTPauth_LogOut(), rpcDone([this, shiftedDcId](const MTPBool &result) {
|
if (dcOptions()->dcType(shiftedDcId) == DcType::Cdn) {
|
||||||
performKeyDestroy(shiftedDcId);
|
performKeyDestroy(shiftedDcId);
|
||||||
}), rpcFail([this, shiftedDcId](const RPCError &error) {
|
} else {
|
||||||
if (isDefaultHandledError(error)) return false;
|
_instance->send(MTPauth_LogOut(), rpcDone([=](const MTPBool &) {
|
||||||
performKeyDestroy(shiftedDcId);
|
performKeyDestroy(shiftedDcId);
|
||||||
return true;
|
}), rpcFail([=](const RPCError &error) {
|
||||||
}), shiftedDcId);
|
if (isDefaultHandledError(error)) return false;
|
||||||
|
performKeyDestroy(shiftedDcId);
|
||||||
|
return true;
|
||||||
|
}), shiftedDcId);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
void Instance::Private::performKeyDestroy(ShiftedDcId shiftedDcId) {
|
void Instance::Private::performKeyDestroy(ShiftedDcId shiftedDcId) {
|
||||||
|
|
Loading…
Reference in New Issue