diff --git a/td/telegram/DeviceTokenManager.cpp b/td/telegram/DeviceTokenManager.cpp index 9f47f380..d6b7093a 100644 --- a/td/telegram/DeviceTokenManager.cpp +++ b/td/telegram/DeviceTokenManager.cpp @@ -414,7 +414,7 @@ void DeviceTokenManager::on_result(NetQueryPtr net_query) { info.state = TokenInfo::State::Sync; info.token.clear(); } - if (r_flag.is_error()) { + if (r_flag.is_error() && !G()->close_flag()) { LOG(ERROR) << r_flag.error(); } }