mirror of
https://github.com/kotatogram/kotatogram-desktop
synced 2025-08-30 14:17:45 +00:00
Don't try to logout CDN dcs.
This commit is contained in:
@@ -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) {
|
||||||
|
Reference in New Issue
Block a user