From 8ffcd29f116479cb859c8c11bb528b2b9686e18c Mon Sep 17 00:00:00 2001 From: levlam Date: Sat, 16 Feb 2019 18:35:01 +0300 Subject: [PATCH] Ignore duplicated auth.authorization. GitOrigin-RevId: 235ebefb1bad5281bdfaa74447571287265ebb6b --- td/telegram/AuthManager.cpp | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/td/telegram/AuthManager.cpp b/td/telegram/AuthManager.cpp index 87a1b9be..344ce7a7 100644 --- a/td/telegram/AuthManager.cpp +++ b/td/telegram/AuthManager.cpp @@ -909,6 +909,13 @@ void AuthManager::on_delete_account_result(NetQueryPtr &result) { } void AuthManager::on_authorization(tl_object_ptr auth) { + if (state_ == State::Ok) { + LOG(WARNING) << "Ignore duplicated auth.authorization"; + if (query_id_ != 0) { + on_query_ok(); + } + return; + } G()->shared_config().set_option_integer("authorization_date", G()->unix_time()); if (was_check_bot_token_) { is_bot_ = true;