Fix updateAuthorizationState on destroy.
GitOrigin-RevId: 584e09935420af73d049a7f9ca669a16f2205304
This commit is contained in:
parent
eba52ebdad
commit
8eb396ae87
@ -688,8 +688,12 @@ void AuthManager::delete_account(uint64 query_id, const string &reason) {
|
|||||||
DcId::main(), NetQuery::Type::Common, NetQuery::AuthFlag::Off));
|
DcId::main(), NetQuery::Type::Common, NetQuery::AuthFlag::Off));
|
||||||
}
|
}
|
||||||
|
|
||||||
void AuthManager::on_closing() {
|
void AuthManager::on_closing(bool destroy_flag) {
|
||||||
update_state(State::Closing);
|
if (destroy_flag) {
|
||||||
|
update_state(State::LoggingOut);
|
||||||
|
} else {
|
||||||
|
update_state(State::Closing);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
void AuthManager::on_new_query(uint64 query_id) {
|
void AuthManager::on_new_query(uint64 query_id) {
|
||||||
|
@ -167,7 +167,7 @@ class AuthManager : public NetActor {
|
|||||||
void delete_account(uint64 query_id, const string &reason);
|
void delete_account(uint64 query_id, const string &reason);
|
||||||
|
|
||||||
void on_authorization_lost();
|
void on_authorization_lost();
|
||||||
void on_closing();
|
void on_closing(bool destroy_flag);
|
||||||
|
|
||||||
// can return nullptr if state isn't initialized yet
|
// can return nullptr if state isn't initialized yet
|
||||||
tl_object_ptr<td_api::AuthorizationState> get_current_authorization_state_object() const;
|
tl_object_ptr<td_api::AuthorizationState> get_current_authorization_state_object() const;
|
||||||
|
@ -3911,7 +3911,7 @@ void Td::close_impl(bool destroy_flag) {
|
|||||||
state_ = State::Close;
|
state_ = State::Close;
|
||||||
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, destroy_flag);
|
||||||
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