Log out only if there is main auth key, but it isn't logged in.
This commit is contained in:
parent
d95b20b631
commit
0d0b641ac6
|
@ -34,7 +34,8 @@ Global::~Global() = default;
|
|||
void Global::log_out(Slice reason) {
|
||||
CHECK(shared_config_ != nullptr);
|
||||
if (!shared_config_->have_option("auth")) {
|
||||
shared_config_->set_option_string("auth", reason);
|
||||
LOG(ERROR) << reason;
|
||||
// shared_config_->set_option_string("auth", reason);
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
@ -231,7 +231,7 @@ void DcAuthManager::loop() {
|
|||
}
|
||||
auto main_dc = find_dc(main_dc_id_.get_raw_id());
|
||||
if (!main_dc || main_dc->auth_key_state != AuthKeyState::OK) {
|
||||
if (need_check_authorization_is_ok_) {
|
||||
if (main_dc && need_check_authorization_is_ok_) {
|
||||
G()->log_out("Authorization check failed in DcAuthManager");
|
||||
}
|
||||
VLOG(dc) << "Skip loop, because main DC is " << main_dc_id_ << ", main auth key state is "
|
||||
|
|
Loading…
Reference in New Issue
Block a user