Use create_task instead of ensure_future to create broadcast task

This commit is contained in:
Ben 2020-06-12 15:19:21 +01:00
parent d6c73fc6d6
commit 42a3cefe80

View File

@ -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: