mirror of
https://github.com/tdlight-team/tdlight-telegram-bot-api.git
synced 2024-12-04 17:42:55 +01:00
Stop ClientManager watchdog at the beginning of closing.
This commit is contained in:
parent
b44bc1cabd
commit
018b4fc6f7
@ -51,6 +51,7 @@ void ClientManager::close(td::Promise<td::Unit> &&promise) {
|
|||||||
}
|
}
|
||||||
|
|
||||||
close_flag_ = true;
|
close_flag_ = true;
|
||||||
|
watchdog_id_.reset();
|
||||||
dump_statistics();
|
dump_statistics();
|
||||||
auto ids = clients_.ids();
|
auto ids = clients_.ids();
|
||||||
for (auto id : ids) {
|
for (auto id : ids) {
|
||||||
@ -543,7 +544,6 @@ void ClientManager::close_db() {
|
|||||||
|
|
||||||
void ClientManager::finish_close() {
|
void ClientManager::finish_close() {
|
||||||
LOG(WARNING) << "Stop ClientManager";
|
LOG(WARNING) << "Stop ClientManager";
|
||||||
watchdog_id_.reset();
|
|
||||||
auto promises = std::move(close_promises_);
|
auto promises = std::move(close_promises_);
|
||||||
for (auto &promise : promises) {
|
for (auto &promise : promises) {
|
||||||
promise.set_value(td::Unit());
|
promise.set_value(td::Unit());
|
||||||
|
Loading…
Reference in New Issue
Block a user