mirror of
				https://github.com/tmux/tmux.git
				synced 2025-11-04 00:56:10 +00:00 
			
		
		
		
	When tty is error or closed, remove client. Reported by Thomas Sattler.
This commit is contained in:
		
							
								
								
									
										3
									
								
								tty.c
									
									
									
									
									
								
							
							
						
						
									
										3
									
								
								tty.c
									
									
									
									
									
								
							@@ -159,8 +159,9 @@ tty_read_callback(__unused int fd, __unused short events, void *data)
 | 
			
		||||
	int		 nread;
 | 
			
		||||
 | 
			
		||||
	nread = evbuffer_read(tty->in, tty->fd, -1);
 | 
			
		||||
	if (nread == -1) {
 | 
			
		||||
	if (nread == 0 || nread == -1) {
 | 
			
		||||
		event_del(&tty->event_in);
 | 
			
		||||
		server_client_lost(tty->client);
 | 
			
		||||
		return;
 | 
			
		||||
	}
 | 
			
		||||
	log_debug("%s: read %d bytes (already %zu)", c->name, nread, size);
 | 
			
		||||
 
 | 
			
		||||
		Reference in New Issue
	
	Block a user