From 42a3cefe804ab1b901caff67b4579087abbea56e Mon Sep 17 00:00:00 2001 From: Ben Date: Fri, 12 Jun 2020 15:19:21 +0100 Subject: [PATCH] Use `create_task` instead of `ensure_future` to create broadcast task --- houdini/handlers/play/music.py | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/houdini/handlers/play/music.py b/houdini/handlers/play/music.py index 812d91a..8cea9b1 100644 --- a/houdini/handlers/play/music.py +++ b/houdini/handlers/play/music.py @@ -54,8 +54,7 @@ class SoundStudio: async def start_broadcasting(self): if not self.broadcasting: self.broadcasting = True - loop = asyncio.get_event_loop() - asyncio.ensure_future(self.broadcast_tracks(), loop=loop) + asyncio.create_task(self.broadcast_tracks()) async def stop_broadcasting(self): if self.broadcasting: