From fd1f28d32ca04a2ecbe272d68f89c38cbafdaad9 Mon Sep 17 00:00:00 2001 From: Andre Noll Date: Fri, 8 Jan 2021 00:55:13 +0100 Subject: [PATCH] alsa_write: Avoid hung tasks. Without this fix the alsa writer may never shutdown, occupying a slot of audiod. The hang was observed with in conjunction to the udp receiver and the prebuffer filter. See also the recent commit 23913cbbfc98. --- alsa_write.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/alsa_write.c b/alsa_write.c index 363e3930..bc06fc31 100644 --- a/alsa_write.c +++ b/alsa_write.c @@ -266,6 +266,8 @@ static int alsa_write_post_select(__a_unused struct sched *s, void *context) goto err; again: ret = btr_node_status(btrn, wn->min_iqs, BTR_NT_LEAF); + if (ret < 0) + goto err; if (ret == 0) return 0; btr_merge(btrn, wn->min_iqs); -- 2.39.5