From 8c82d1b99c02bc4cf328d84b88f37ac3a86142a4 Mon Sep 17 00:00:00 2001 From: arabcoders Date: Mon, 23 Jun 2025 01:13:17 +0300 Subject: [PATCH] create new loop in main thread --- app/main.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/app/main.py b/app/main.py index 4693b7f4..42cb9308 100644 --- a/app/main.py +++ b/app/main.py @@ -38,7 +38,7 @@ class Main: def __init__(self, is_native: bool = False): self._config = Config.get_instance(is_native=is_native) self._app = web.Application() - self.loop = asyncio.get_event_loop() + self.loop = asyncio.new_event_loop() self._app.on_shutdown.append(self.on_shutdown) Services.get_instance().add("app", self._app)