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
This commit is contained in:
Wim Taymans 2021-05-26 10:44:59 +02:00
parent 4e4294dc13
commit 492caf4456

View file

@ -1382,7 +1382,9 @@ static void stream_state_changed(void *data, enum pw_stream_state old,
stream->done = true; stream->done = true;
break; break;
case PW_STREAM_STATE_UNCONNECTED: 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->killed = true;
stream->done = true; stream->done = true;
break; break;