aboutsummaryrefslogtreecommitdiffhomepage
diff options
context:
space:
mode:
-rw-r--r--telegram-bot-api/HttpServer.h9
1 files changed, 7 insertions, 2 deletions
diff --git a/telegram-bot-api/HttpServer.h b/telegram-bot-api/HttpServer.h
index a4a44e2..1ffa2a5 100644
--- a/telegram-bot-api/HttpServer.h
+++ b/telegram-bot-api/HttpServer.h
@@ -42,6 +42,10 @@ class HttpServer final : public td::TcpListener::Callback {
td::ActorOwn<td::TcpListener> listener_;
td::FloodControlFast flood_control_;
+ static constexpr std::size_t MAX_IN_MEMORY_POST_SIZE = 0;
+ static constexpr std::size_t MAX_FILE_COUNT = 50;
+ static constexpr td::int32 IDLE_TIMEOUT = 500;
+
void start_up() final {
auto now = td::Time::now();
auto wakeup_at = flood_control_.get_wakeup_at();
@@ -63,8 +67,9 @@ class HttpServer final : public td::TcpListener::Callback {
}
void accept(td::SocketFd fd) final {
- td::create_actor<td::HttpInboundConnection>("HttpInboundConnection", td::BufferedFd<td::SocketFd>(std::move(fd)), 0,
- 50, 500, creator_(), SharedData::get_slow_incoming_http_scheduler_id())
+ td::create_actor<td::HttpInboundConnection>("HttpInboundConnection", td::BufferedFd<td::SocketFd>(std::move(fd)),
+ MAX_IN_MEMORY_POST_SIZE, MAX_FILE_COUNT, IDLE_TIMEOUT, creator_(),
+ SharedData::get_slow_incoming_http_scheduler_id())
.release();
}