From 5cff8da9cd1d49d8987228c1c87f3cc67c80edc9 Mon Sep 17 00:00:00 2001 From: mihalin Date: Fri, 18 Feb 2022 07:51:51 +0300 Subject: [PATCH] webhook less connections --- server/server.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/server/server.py b/server/server.py index 727aa0f..569c435 100644 --- a/server/server.py +++ b/server/server.py @@ -33,7 +33,8 @@ async def register_token(bot: Bot) -> bool: if ServerSettings.use_custom_cert(): certificate = open(ServerSettings.public_path(), 'rb') - res = await a_bot.set_webhook(url_for_bot(bot), certificate=certificate, drop_pending_updates=True) + res = await a_bot.set_webhook(url_for_bot(bot), certificate=certificate, drop_pending_updates=True, + max_connections=10) await a_bot.session.close() del a_bot return res