We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent a4ca978 commit 17dc987Copy full SHA for 17dc987
music_assistant/helpers/buffered_generator.py
@@ -78,8 +78,10 @@ async def producer() -> None:
78
if not generator_consumed:
79
await close_async_generator(generator)
80
# Signal end of stream by putting None
81
- with contextlib.suppress(asyncio.QueueFull):
82
- buffer.put_nowait(None)
+ # We must wait for space in the queue if needed, otherwise the consumer may
+ # hang waiting for data that will never come
83
+ if not cancelled.is_set():
84
+ await buffer.put(None)
85
86
# Start the producer task
87
loop = asyncio.get_running_loop()
0 commit comments