From 525b8ff2f969918e79d4dbf742b6f7a9f0f87594 Mon Sep 17 00:00:00 2001 From: levlam Date: Fri, 1 Jan 2021 16:27:36 +0300 Subject: [PATCH] Start webhook connection creation in inactive mode. --- telegram-bot-api/WebhookActor.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/telegram-bot-api/WebhookActor.cpp b/telegram-bot-api/WebhookActor.cpp index 75ade49..e04887d 100644 --- a/telegram-bot-api/WebhookActor.cpp +++ b/telegram-bot-api/WebhookActor.cpp @@ -653,7 +653,7 @@ void WebhookActor::handle(td::unique_ptr response) { void WebhookActor::start_up() { max_loaded_updates_ = max_connections_ * 2; - next_ip_address_resolve_time_ = last_success_time_ = td::Time::now(); + next_ip_address_resolve_time_ = last_success_time_ = td::Time::now() - 3600; active_new_connection_flood_.add_limit(1, 10 * max_connections_); active_new_connection_flood_.add_limit(5, 20 * max_connections_);