webhook less connections

This commit is contained in:
mihalin 2022-02-18 07:51:51 +03:00
parent 36a0bc0f95
commit 5cff8da9cd

View File

@ -33,7 +33,8 @@ async def register_token(bot: Bot) -> bool:
if ServerSettings.use_custom_cert(): if ServerSettings.use_custom_cert():
certificate = open(ServerSettings.public_path(), 'rb') 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() await a_bot.session.close()
del a_bot del a_bot
return res return res