From 6b6bf1e1d06c0f02c7c80ba472f0c0c04a40fc7f Mon Sep 17 00:00:00 2001 From: Wim Taymans Date: Mon, 22 Mar 2021 10:16:48 +0100 Subject: [PATCH] pulse-server: always reply to pending drain operation When we destroy a stream but there is still a pending drain operation, send an error for the drain tag first. --- src/modules/module-protocol-pulse/pulse-server.c | 3 +++ 1 file changed, 3 insertions(+) diff --git a/src/modules/module-protocol-pulse/pulse-server.c b/src/modules/module-protocol-pulse/pulse-server.c index 5334bb7be..6d7696760 100644 --- a/src/modules/module-protocol-pulse/pulse-server.c +++ b/src/modules/module-protocol-pulse/pulse-server.c @@ -1115,6 +1115,9 @@ static void stream_free(struct stream *stream) pw_log_debug(NAME" %p: stream %p channel:%d", impl, stream, stream->channel); + if (stream->drain_tag) + reply_error(client, -1, stream->drain_tag, -ENOENT); + /* force processing of all pending messages before we destroy * the stream */ pw_loop_invoke(impl->loop, NULL, 0, NULL, 0, false, client);