From 738e0a999ff3b7c3805572bd96c5b2d016f0d5db Mon Sep 17 00:00:00 2001 From: Joel Beckmeyer Date: Sat, 16 Oct 2021 08:58:49 -0400 Subject: [PATCH] fix DeprecationWarnings on 3.10 --- relay/__main__.py | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/relay/__main__.py b/relay/__main__.py index 847f765..7d27c42 100644 --- a/relay/__main__.py +++ b/relay/__main__.py @@ -45,8 +45,9 @@ async def start_webserver(): await site.start() def main(): - loop = asyncio.get_event_loop() - asyncio.ensure_future(start_webserver()) + loop = asyncio.new_event_loop() + asyncio.set_event_loop(loop) + asyncio.ensure_future(start_webserver(), loop=loop) loop.run_forever()