From a7e0ce2971a0a320849c8b11080fa6b737b6935b Mon Sep 17 00:00:00 2001 From: Oleg A Date: Wed, 22 Dec 2021 11:18:48 +0300 Subject: [PATCH] fix: pass loop to aiohttp --- aiogram/utils/executor.py | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/aiogram/utils/executor.py b/aiogram/utils/executor.py index d93af29a..bbca6b65 100644 --- a/aiogram/utils/executor.py +++ b/aiogram/utils/executor.py @@ -105,7 +105,7 @@ def start_webhook(dispatcher, webhook_path, *, loop=None, skip_updates=None, check_ip=check_ip, retry_after=retry_after, route_name=route_name) - executor.run_app(**kwargs) + executor.run_app(loop=loop, **kwargs) def start(dispatcher, future, *, loop=None, skip_updates=None, @@ -303,6 +303,8 @@ class Executor: :return: """ self.set_webhook(webhook_path=webhook_path, request_handler=request_handler, route_name=route_name) + if "loop" not in kwargs: + kwargs["loop"] = self.loop self.run_app(**kwargs) def start_polling(self, reset_webhook=None, timeout=20, relax=0.1, fast=True,