mirror of
https://gitlab.freedesktop.org/pipewire/pipewire.git
synced 2025-11-03 09:01:54 -05:00
pulse-server: client: move to cleanup list on detach
Move a client to the `impl->cleanup_clients` list right after it has been removed its server's `clients` list.
This commit is contained in:
parent
d2edb1ab16
commit
78aaa0a3dd
1 changed files with 1 additions and 1 deletions
|
|
@ -99,6 +99,7 @@ bool client_detach(struct client *client)
|
|||
|
||||
/* remove from the `server->clients` list */
|
||||
spa_list_remove(&client->link);
|
||||
spa_list_append(&impl->cleanup_clients, &client->link);
|
||||
|
||||
server->n_clients--;
|
||||
if (server->wait_clients > 0 && --server->wait_clients == 0) {
|
||||
|
|
@ -125,7 +126,6 @@ void client_disconnect(struct client *client)
|
|||
spa_assert(client->server == NULL);
|
||||
|
||||
client->disconnect = true;
|
||||
spa_list_append(&impl->cleanup_clients, &client->link);
|
||||
|
||||
pw_map_for_each(&client->streams, client_free_stream, client);
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue