SessionProxy: bugfix

GitOrigin-RevId: b2cdc985d4465cdd19f85d024a5de9d8e882e8f0
This commit is contained in:
Arseny Smirnov 2018-11-01 19:34:18 +03:00
parent 1cb68fab96
commit 03604bb367

View File

@ -154,6 +154,7 @@ void SessionProxy::open_session(bool force) {
if (!session_.empty()) {
return;
}
if (!force) {
if (auth_state_ == AuthState::Empty && need_destroy_) {
return;
}
@ -163,6 +164,7 @@ void SessionProxy::open_session(bool force) {
if (!is_main_ && pending_queries_.empty() && !need_destroy_) {
return;
}
}
CHECK(session_.empty());
auto dc_id = auth_data_->dc_id();