stream: destroy proxy on disconnect

This commit is contained in:
Wim Taymans 2019-08-01 15:06:54 +02:00
parent 960a82dbb9
commit b655fd08f7

View file

@ -1435,16 +1435,13 @@ int pw_stream_disconnect(struct pw_stream *stream)
pw_log_debug(NAME" %p: disconnect", stream); pw_log_debug(NAME" %p: disconnect", stream);
impl->disconnecting = true; impl->disconnecting = true;
if (stream->proxy) { if (stream->proxy)
stream->proxy = NULL; pw_proxy_destroy(stream->proxy);
spa_hook_remove(&stream->proxy_listener);
stream->node_id = SPA_ID_INVALID;
}
if (impl->node) { if (impl->node) {
pw_node_destroy(impl->node); pw_node_destroy(impl->node);
impl->node = NULL; impl->node = NULL;
} }
stream_set_state(stream, PW_STREAM_STATE_UNCONNECTED, NULL);
return 0; return 0;
} }