From 492caf44565a2820fd8e04bb8206a024d472053e Mon Sep 17 00:00:00 2001 From: Wim Taymans Date: Wed, 26 May 2021 10:44:59 +0200 Subject: [PATCH] pulse-server: handle errors during create If a stream is being created and an error occurs we always need to reply with the pending create_tag. Fixes #624 --- src/modules/module-protocol-pulse/pulse-server.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/src/modules/module-protocol-pulse/pulse-server.c b/src/modules/module-protocol-pulse/pulse-server.c index 125cd1bf5..359fbb2a5 100644 --- a/src/modules/module-protocol-pulse/pulse-server.c +++ b/src/modules/module-protocol-pulse/pulse-server.c @@ -1382,7 +1382,9 @@ static void stream_state_changed(void *data, enum pw_stream_state old, stream->done = true; break; case PW_STREAM_STATE_UNCONNECTED: - if (!client->disconnecting) + if (stream->create_tag != SPA_ID_INVALID) + reply_error(client, -1, stream->create_tag, -ENOENT); + else if (!client->disconnecting) stream->killed = true; stream->done = true; break;