mirror of
https://github.com/civsocit/olgram.git
synced 2023-07-22 01:29:12 +03:00
webhook less connections
This commit is contained in:
parent
36a0bc0f95
commit
5cff8da9cd
@ -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
|
||||||
|
Loading…
Reference in New Issue
Block a user