From: marcelveldt Date: Sat, 19 Oct 2019 22:16:53 +0000 (+0200) Subject: Update http_streamer.py X-Git-Url: https://git.kitaultman.com/?a=commitdiff_plain;h=7834d6c743555065359651da7b75cde582bf2dd8;p=music-assistant-server.git Update http_streamer.py --- diff --git a/music_assistant/http_streamer.py b/music_assistant/http_streamer.py index a5df76ef..bd496abd 100755 --- a/music_assistant/http_streamer.py +++ b/music_assistant/http_streamer.py @@ -148,7 +148,8 @@ class HTTPStreamer(): asyncio.run_coroutine_threadsafe( buffer.put(b''), self.mass.event_loop) # start fill buffer task in background - threading.Thread(target=fill_buffer).start() + fill_buffer_thread = threading.Thread(target=fill_buffer) + fill_buffer_thread.start() LOGGER.info("Start Queue Stream for player %s " %(player.name)) is_start = True @@ -278,6 +279,8 @@ class HTTPStreamer(): ### END OF QUEUE STREAM sox_proc.stdin.close() sox_proc.terminate() + fill_buffer_thread.join() + del sox_proc LOGGER.info("streaming of queue for player %s completed" % player.name) async def __get_audio_stream(self, player, queue_item, cancelled,