remote-node: suspend node before cleanup

When the proxy is destroyed, suspend the node before we start
removing the memory or else the node might still be using it from
the data thread and crash.
This commit is contained in:
Wim Taymans 2020-06-03 12:04:01 +02:00
parent e4e03fa7dd
commit b4b7ba4cbb

View file

@ -1034,10 +1034,12 @@ static void client_node_destroy(void *_data)
pw_log_debug("%p: destroy", data); pw_log_debug("%p: destroy", data);
clean_node(data);
spa_hook_remove(&data->node_listener); spa_hook_remove(&data->node_listener);
pw_impl_node_set_state(data->node, PW_NODE_STATE_SUSPENDED);
clean_node(data);
data->client_node = NULL; data->client_node = NULL;
if (data->proxy) if (data->proxy)