Do not update online status when closing.
GitOrigin-RevId: 0ebca2a7c14d44a5bc4945abe239efbeed18382c
This commit is contained in:
parent
646f0381a2
commit
2312c5e1a6
@ -3513,10 +3513,7 @@ void Td::on_alarm_timeout(int64 request_id) {
|
|||||||
}
|
}
|
||||||
|
|
||||||
void Td::on_online_updated(bool force, bool send_update) {
|
void Td::on_online_updated(bool force, bool send_update) {
|
||||||
if (auth_manager_->is_bot()) {
|
if (close_flag_ >= 2 || auth_manager_->is_bot() || !auth_manager_->is_authorized()) {
|
||||||
return;
|
|
||||||
}
|
|
||||||
if (!auth_manager_->is_authorized()) {
|
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
if (force || is_online_) {
|
if (force || is_online_) {
|
||||||
@ -3999,7 +3996,6 @@ void Td::close_impl(bool destroy_flag) {
|
|||||||
close_flag_ = 1;
|
close_flag_ = 1;
|
||||||
G()->set_close_flag();
|
G()->set_close_flag();
|
||||||
send_closure(auth_manager_actor_, &AuthManager::on_closing);
|
send_closure(auth_manager_actor_, &AuthManager::on_closing);
|
||||||
close_flag_ = 1;
|
|
||||||
LOG(WARNING) << "Close " << tag("destroy", destroy_flag);
|
LOG(WARNING) << "Close " << tag("destroy", destroy_flag);
|
||||||
|
|
||||||
// wait till all request_actors will stop.
|
// wait till all request_actors will stop.
|
||||||
|
Loading…
Reference in New Issue
Block a user