From e11a2671372d2bcc1d0be117a5a34fc6cf3812cf Mon Sep 17 00:00:00 2001 From: Marcel van der Veldt Date: Thu, 11 Apr 2024 15:42:45 +0200 Subject: [PATCH] fix another race condition --- music_assistant/server/helpers/audio.py | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/music_assistant/server/helpers/audio.py b/music_assistant/server/helpers/audio.py index 8e70a5f2..3e742d66 100644 --- a/music_assistant/server/helpers/audio.py +++ b/music_assistant/server/helpers/audio.py @@ -119,8 +119,9 @@ class FFMpeg(AsyncProcess): await self._stdin_task # make sure the stdin generator is also properly closed # by propagating a cancellederror within - task = asyncio.create_task(self.audio_input.__anext__()) - task.cancel() + with suppress(RuntimeError): + task = asyncio.create_task(self.audio_input.__anext__()) + task.cancel() if not self.collect_log_history: await super().close(send_signal) return -- 2.34.1