Set close_flag before clearing requests.
This commit is contained in:
parent
f11c4e8af4
commit
d120d0ab66
@ -3421,10 +3421,10 @@ void Td::close_impl(bool destroy_flag) {
|
||||
|
||||
LOG(WARNING) << (destroy_flag ? "Destroy" : "Close") << " Td in state " << static_cast<int32>(state_);
|
||||
if (state_ == State::WaitParameters) {
|
||||
clear_requests();
|
||||
state_ = State::Close;
|
||||
close_flag_ = 4;
|
||||
G()->set_close_flag();
|
||||
clear_requests();
|
||||
send_update(td_api::make_object<td_api::updateAuthorizationState>(
|
||||
td_api::make_object<td_api::authorizationStateClosing>()));
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user