Этот коммит содержится в:
John Preston 2018-05-18 19:41:59 +03:00
родитель 66b7b6da2a
Коммит 96f7c0c02e
1 изменённых файлов: 10 добавлений и 6 удалений

Просмотреть файл

@ -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 {
_instance->send(MTPauth_LogOut(), rpcDone([=](const MTPBool &) {
performKeyDestroy(shiftedDcId);
}), rpcFail([=](const RPCError &error) {
if (isDefaultHandledError(error)) return false; if (isDefaultHandledError(error)) return false;
performKeyDestroy(shiftedDcId); performKeyDestroy(shiftedDcId);
return true; return true;
}), shiftedDcId); }), shiftedDcId);
}
} }
void Instance::Private::performKeyDestroy(ShiftedDcId shiftedDcId) { void Instance::Private::performKeyDestroy(ShiftedDcId shiftedDcId) {