impl-node: set INACTIVE state on server

Don't wait for the client to set the INACTIVE state, do it on the
server. We already decremented the target required so we don't want to
schedule the node anymore.

Fixes some xruns when removing nodes in a stress test.
This commit is contained in:
Wim Taymans 2024-07-03 17:42:39 +02:00
parent 525360d70a
commit d08df293a9

View file

@ -221,7 +221,7 @@ do_node_unprepare(struct spa_loop *loop, bool async, uint32_t seq,
if (!this->rt.prepared) if (!this->rt.prepared)
return 0; return 0;
if (!this->remote || this->rt.target.activation->client_version < 1) { if (!this->exported) {
/* We mark ourself as finished now, this will avoid going further into the process loop /* We mark ourself as finished now, this will avoid going further into the process loop
* in case our fd was ready (removing ourselfs from the loop should avoid that as well). * in case our fd was ready (removing ourselfs from the loop should avoid that as well).
* If we were supposed to be scheduled make sure we continue the graph for the peers we * If we were supposed to be scheduled make sure we continue the graph for the peers we