Fix logging out befor logging in.

GitOrigin-RevId: f424f10e00ad57c9c0cb44fc60267f098106a120
This commit is contained in:
levlam 2019-04-21 02:23:26 +03:00
parent 7dddc07dfe
commit 4894992e29

View File

@ -293,9 +293,9 @@ void AuthManager::logout(uint64 query_id) {
}
on_new_query(query_id);
if (state_ != State::Ok) {
update_state(State::LoggingOut);
// TODO: could skip full logout if still no authorization
// TODO: send auth.cancelCode if state_ == State::WaitCode
destroy_auth_keys();
on_query_ok();
} else {
LOG(INFO) << "Logging out";