Update http_streamer.py
authormarcelveldt <marcelvanderveldt@MacBook-Silvia.local>
Sun, 20 Oct 2019 13:27:32 +0000 (15:27 +0200)
committermarcelveldt <marcelvanderveldt@MacBook-Silvia.local>
Sun, 20 Oct 2019 13:27:32 +0000 (15:27 +0200)
music_assistant/http_streamer.py

index f25325e0a189c2e8bde7cc2621c03e9e6bf685d6..8261b7b2d8f353b5cd2d96ca266ca39868269b34 100755 (executable)
@@ -68,8 +68,7 @@ class HTTPStreamer():
                 self.__stream_single, player, queue_item, resp, cancelled)
         # let the streaming begin!
         try:
-            while not cancelled.is_set():
-                await asyncio.sleep(0.1)
+            await asyncio.gather(bg_task)
         except (asyncio.CancelledError):
             LOGGER.warning("stream cancelled")
             cancelled.set()