mirror of
				https://github.com/tmux/tmux.git
				synced 2025-11-04 09:26:05 +00:00 
			
		
		
		
	Move client-detached into server_client_lost so it is fired even if a
client is closed unexpectedly.
This commit is contained in:
		@@ -299,6 +299,9 @@ server_client_lost(struct client *c)
 | 
				
			|||||||
	TAILQ_REMOVE(&clients, c, entry);
 | 
						TAILQ_REMOVE(&clients, c, entry);
 | 
				
			||||||
	log_debug("lost client %p", c);
 | 
						log_debug("lost client %p", c);
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
						if (c->flags & CLIENT_ATTACHED)
 | 
				
			||||||
 | 
							notify_client("client-detached", c);
 | 
				
			||||||
 | 
					
 | 
				
			||||||
	if (c->flags & CLIENT_CONTROL)
 | 
						if (c->flags & CLIENT_CONTROL)
 | 
				
			||||||
		control_stop(c);
 | 
							control_stop(c);
 | 
				
			||||||
	if (c->flags & CLIENT_TERMINAL)
 | 
						if (c->flags & CLIENT_TERMINAL)
 | 
				
			||||||
@@ -1769,9 +1772,6 @@ server_client_check_exit(struct client *c)
 | 
				
			|||||||
		if (EVBUFFER_LENGTH(cf->buffer) != 0)
 | 
							if (EVBUFFER_LENGTH(cf->buffer) != 0)
 | 
				
			||||||
			return;
 | 
								return;
 | 
				
			||||||
	}
 | 
						}
 | 
				
			||||||
 | 
					 | 
				
			||||||
	if (c->flags & CLIENT_ATTACHED)
 | 
					 | 
				
			||||||
		notify_client("client-detached", c);
 | 
					 | 
				
			||||||
	c->flags |= CLIENT_EXITED;
 | 
						c->flags |= CLIENT_EXITED;
 | 
				
			||||||
 | 
					
 | 
				
			||||||
	switch (c->exit_type) {
 | 
						switch (c->exit_type) {
 | 
				
			||||||
 
 | 
				
			|||||||
		Reference in New Issue
	
	Block a user