mirror of
				https://gitlab.freedesktop.org/pipewire/pipewire.git
				synced 2025-11-03 09:01:54 -05:00 
			
		
		
		
	context: destroy clients first
Destroy clients before trying to remove nodes. If the clients are still connected they might try to react to the removed nodes.
This commit is contained in:
		
							parent
							
								
									664ecbefee
								
							
						
					
					
						commit
						bc35221210
					
				
					 1 changed files with 4 additions and 0 deletions
				
			
		| 
						 | 
					@ -347,6 +347,7 @@ void pw_context_destroy(struct pw_context *context)
 | 
				
			||||||
{
 | 
					{
 | 
				
			||||||
	struct impl *impl = SPA_CONTAINER_OF(context, struct impl, this);
 | 
						struct impl *impl = SPA_CONTAINER_OF(context, struct impl, this);
 | 
				
			||||||
	struct pw_global *global;
 | 
						struct pw_global *global;
 | 
				
			||||||
 | 
						struct pw_impl_client *client;
 | 
				
			||||||
	struct pw_impl_module *module;
 | 
						struct pw_impl_module *module;
 | 
				
			||||||
	struct pw_impl_device *device;
 | 
						struct pw_impl_device *device;
 | 
				
			||||||
	struct pw_core *core;
 | 
						struct pw_core *core;
 | 
				
			||||||
| 
						 | 
					@ -361,6 +362,9 @@ void pw_context_destroy(struct pw_context *context)
 | 
				
			||||||
	spa_list_consume(core, &context->core_list, link)
 | 
						spa_list_consume(core, &context->core_list, link)
 | 
				
			||||||
		pw_core_disconnect(core);
 | 
							pw_core_disconnect(core);
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
						spa_list_consume(client, &context->client_list, link)
 | 
				
			||||||
 | 
							pw_impl_client_destroy(client);
 | 
				
			||||||
 | 
					
 | 
				
			||||||
	spa_list_consume(node, &context->node_list, link)
 | 
						spa_list_consume(node, &context->node_list, link)
 | 
				
			||||||
		pw_impl_node_destroy(node);
 | 
							pw_impl_node_destroy(node);
 | 
				
			||||||
 | 
					
 | 
				
			||||||
| 
						 | 
					
 | 
				
			||||||
		Loading…
	
	Add table
		Add a link
		
	
		Reference in a new issue