From: Marcel van der Veldt Date: Sun, 2 Nov 2025 17:01:26 +0000 (+0100) Subject: Mark buffer as cancelled when producer fails X-Git-Url: https://git.kitaultman.com/?a=commitdiff_plain;h=d0979e099e9a1f1b10eda3a0f3d364a0b70b3ab9;p=music-assistant-server.git Mark buffer as cancelled when producer fails --- diff --git a/music_assistant/helpers/audio_buffer.py b/music_assistant/helpers/audio_buffer.py index f2367131..994c4540 100644 --- a/music_assistant/helpers/audio_buffer.py +++ b/music_assistant/helpers/audio_buffer.py @@ -319,6 +319,9 @@ class AudioBuffer: exc = t.exception() if exc is not None and isinstance(exc, Exception): self._producer_error = exc + # Mark buffer as cancelled when producer fails + # This prevents reuse of a buffer in error state + self._cancelled = True # Wake up any waiting consumers so they can see the error loop = asyncio.get_running_loop() loop.call_soon_threadsafe(self._data_available.notify_all)