From 0e311c404b259c2a450a04f8557a1abfc2446c91 Mon Sep 17 00:00:00 2001 From: levlam Date: Tue, 6 Feb 2024 13:13:50 +0300 Subject: [PATCH] Add more logging. --- td/telegram/AuthManager.cpp | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/td/telegram/AuthManager.cpp b/td/telegram/AuthManager.cpp index d0a04bb53..1740f0f56 100644 --- a/td/telegram/AuthManager.cpp +++ b/td/telegram/AuthManager.cpp @@ -319,6 +319,8 @@ void AuthManager::start_up() { G()->net_query_dispatcher().destroy_auth_keys(PromiseCreator::lambda([](Result result) { if (result.is_ok()) { send_closure_later(G()->td(), &Td::destroy); + } else { + LOG(INFO) << "Failed to destroy auth keys"; } })); } @@ -1159,6 +1161,7 @@ void AuthManager::on_authorization_lost(string source) { void AuthManager::destroy_auth_keys() { if (state_ == State::Closing || state_ == State::DestroyingKeys) { + LOG(INFO) << "Already destroying auth keys"; return; } update_state(State::DestroyingKeys); @@ -1166,6 +1169,8 @@ void AuthManager::destroy_auth_keys() { G()->net_query_dispatcher().destroy_auth_keys(PromiseCreator::lambda([](Result result) { if (result.is_ok()) { send_closure_later(G()->td(), &Td::destroy); + } else { + LOG(INFO) << "Failed to destroy auth keys"; } })); }