Merge branch 'asyncio-3.10' into 'master'

fix DeprecationWarnings on 3.10

See merge request pleroma/relay!32
This commit is contained in:
Izalia Mae 2021-11-05 19:18:55 +00:00
commit 5c5f212d70
1 changed files with 3 additions and 2 deletions

View File

@ -45,8 +45,9 @@ async def start_webserver():
await site.start() await site.start()
def main(): def main():
loop = asyncio.get_event_loop() loop = asyncio.new_event_loop()
asyncio.ensure_future(start_webserver()) asyncio.set_event_loop(loop)
asyncio.ensure_future(start_webserver(), loop=loop)
loop.run_forever() loop.run_forever()