node: suspend before emiting destroy

The suspend makes sure no processing is going to be happening
while the signal could destroy resources.
This commit is contained in:
Wim Taymans 2020-06-02 18:11:54 +02:00
parent 17d7cdc80e
commit 3d22baab84

View file

@ -1539,10 +1539,11 @@ void pw_impl_node_destroy(struct pw_impl_node *node)
pw_log_debug(NAME" %p: destroy", impl);
pw_log_info("(%s-%u) destroy", node->name, node->info.id);
pw_impl_node_emit_destroy(node);
suspend_node(node);
pw_impl_node_emit_destroy(node);
pw_log_debug(NAME" %p: driver node %p", impl, node->driver_node);
/* remove ourself as a follower from the driver node */