From: Marcel van der Veldt Date: Thu, 9 Jan 2025 21:34:47 +0000 (+0100) Subject: Fix: Audio received watchdog may be as short as 30 seconds for first chunk X-Git-Url: https://git.kitaultman.com/?a=commitdiff_plain;h=2654a48f017b8b2d64f752d32bc229ab23b34f2b;p=music-assistant-server.git Fix: Audio received watchdog may be as short as 30 seconds for first chunk --- diff --git a/music_assistant/helpers/ffmpeg.py b/music_assistant/helpers/ffmpeg.py index 3dbab2d5..31fbdd8b 100644 --- a/music_assistant/helpers/ffmpeg.py +++ b/music_assistant/helpers/ffmpeg.py @@ -132,7 +132,7 @@ class FFMpeg(AsyncProcess): async def stdin_watchdog() -> None: # this is a simple watchdog to ensure we don't get stuck forever waiting for audio data try: - await asyncio.wait_for(audio_received.wait(), timeout=300) + await asyncio.wait_for(audio_received.wait(), timeout=30) except TimeoutError: self.logger.error("No audio data received from source after timeout") self._stdin_task.cancel()