When terminating, keep control connections open until the end.
This ensures all device files and listening sockets have been closed before tincctl gets notified of tincd's termination.
This commit is contained in:
		
							parent
							
								
									86116bb022
								
							
						
					
					
						commit
						e053713465
					
				
					 1 changed files with 3 additions and 0 deletions
				
			
		| 
						 | 
				
			
			@ -963,6 +963,9 @@ void close_network_connections(void) {
 | 
			
		|||
	for(node = connection_tree->head; node; node = next) {
 | 
			
		||||
		next = node->next;
 | 
			
		||||
		c = node->data;
 | 
			
		||||
		/* Keep control connections open until the end, so they know when we really terminated */
 | 
			
		||||
		if(c->status.control)
 | 
			
		||||
			c->socket = -1;
 | 
			
		||||
		c->outgoing = NULL;
 | 
			
		||||
		terminate_connection(c, false);
 | 
			
		||||
	}
 | 
			
		||||
| 
						 | 
				
			
			
 | 
			
		|||
		Loading…
	
	Add table
		Add a link
		
	
		Reference in a new issue