From 452a1900942fce82a5e9e96237213f46108975c2 Mon Sep 17 00:00:00 2001 From: levlam Date: Fri, 6 Jan 2023 16:30:12 +0300 Subject: [PATCH] Reduce Watchdog timeout to 0.25. --- telegram-bot-api/ClientManager.h | 2 +- telegram-bot-api/telegram-bot-api.cpp | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/telegram-bot-api/ClientManager.h b/telegram-bot-api/ClientManager.h index 33ef4c7..ef91214 100644 --- a/telegram-bot-api/ClientManager.h +++ b/telegram-bot-api/ClientManager.h @@ -76,7 +76,7 @@ class ClientManager final : public td::Actor { td::int64 tqueue_deleted_events_ = 0; td::int64 last_tqueue_deleted_events_ = 0; - static constexpr double WATCHDOG_TIMEOUT = 0.5; + static constexpr double WATCHDOG_TIMEOUT = 0.25; static td::int64 get_tqueue_id(td::int64 user_id, bool is_test_dc); diff --git a/telegram-bot-api/telegram-bot-api.cpp b/telegram-bot-api/telegram-bot-api.cpp index 8b7b975..60713ee 100644 --- a/telegram-bot-api/telegram-bot-api.cpp +++ b/telegram-bot-api/telegram-bot-api.cpp @@ -497,7 +497,7 @@ int main(int argc, char *argv[]) { .release(); } - constexpr double WATCHDOG_TIMEOUT = 0.5; + constexpr double WATCHDOG_TIMEOUT = 0.25; auto watchdog_id = sched.create_actor_unsafe(thread_count - 2, "Watchdog", td::this_thread::get_id(), WATCHDOG_TIMEOUT);