Stop ClientManager watchdog at the beginning of closing.

This commit is contained in:
levlam 2022-10-13 01:23:05 +03:00
parent b44bc1cabd
commit 018b4fc6f7

View File

@ -51,6 +51,7 @@ void ClientManager::close(td::Promise<td::Unit> &&promise) {
}
close_flag_ = true;
watchdog_id_.reset();
dump_statistics();
auto ids = clients_.ids();
for (auto id : ids) {
@ -543,7 +544,6 @@ void ClientManager::close_db() {
void ClientManager::finish_close() {
LOG(WARNING) << "Stop ClientManager";
watchdog_id_.reset();
auto promises = std::move(close_promises_);
for (auto &promise : promises) {
promise.set_value(td::Unit());