Improve logging.
This commit is contained in:
parent
741c80cf13
commit
90cc7a5f9c
@ -198,17 +198,18 @@ void DcAuthManager::destroy_loop() {
|
|||||||
if (!need_destroy_auth_key_) {
|
if (!need_destroy_auth_key_) {
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
bool is_ready{true};
|
bool is_ready = true;
|
||||||
for (auto &dc : dcs_) {
|
for (auto &dc : dcs_) {
|
||||||
is_ready &= dc.auth_key_state == AuthKeyState::Empty;
|
if (dc.auth_key_state != AuthKeyState::Empty) {
|
||||||
|
is_ready = false;
|
||||||
|
VLOG(dc) << "Auth key in " << dc.dc_id << " in state " << dc.auth_key_state << " must be destroyed";
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
if (is_ready) {
|
if (is_ready) {
|
||||||
VLOG(dc) << "Destroy auth keys loop is ready, all keys are destroyed";
|
VLOG(dc) << "All keys were destroyed";
|
||||||
destroy_promise_.set_value(Unit());
|
destroy_promise_.set_value(Unit());
|
||||||
need_destroy_auth_key_ = false;
|
need_destroy_auth_key_ = false;
|
||||||
} else {
|
|
||||||
VLOG(dc) << "DC is not ready for destroying auth key";
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user