mirror of
https://github.com/PaiGramTeam/telegram-bot-api.git
synced 2024-11-22 23:42:28 +00:00
Improve flood control for new webhook connections.
This commit is contained in:
parent
53aa4d2f03
commit
9842d5754f
@ -673,10 +673,10 @@ void WebhookActor::start_up() {
|
||||
max_loaded_updates_ = max_connections_ * 2;
|
||||
|
||||
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_);
|
||||
|
||||
pending_new_connection_flood_.add_limit(1, 1);
|
||||
active_new_connection_flood_.add_limit(1, 20);
|
||||
|
||||
pending_new_connection_flood_.add_limit(2, 1);
|
||||
|
||||
if (!parameters_->local_mode_) {
|
||||
if (url_.protocol_ == td::HttpUrl::Protocol::Https) {
|
||||
|
Loading…
Reference in New Issue
Block a user