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.
This commit is contained in:
Wim Taymans 2021-03-22 10:16:48 +01:00
parent 8b7502c8db
commit 6b6bf1e1d0

View file

@ -1115,6 +1115,9 @@ static void stream_free(struct stream *stream)
pw_log_debug(NAME" %p: stream %p channel:%d", impl, stream, stream->channel); 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 /* force processing of all pending messages before we destroy
* the stream */ * the stream */
pw_loop_invoke(impl->loop, NULL, 0, NULL, 0, false, client); pw_loop_invoke(impl->loop, NULL, 0, NULL, 0, false, client);