mirror of
				https://github.com/tmux/tmux.git
				synced 2025-11-04 09:26:05 +00:00 
			
		
		
		
	from nicm: : handle msgbuf_write() returning EAGAIN
This commit is contained in:
		
							
								
								
									
										2
									
								
								client.c
									
									
									
									
									
								
							
							
						
						
									
										2
									
								
								client.c
									
									
									
									
									
								
							@@ -464,7 +464,7 @@ client_callback(unused int fd, short events, void *data)
 | 
			
		||||
	}
 | 
			
		||||
 | 
			
		||||
	if (events & EV_WRITE) {
 | 
			
		||||
		if (msgbuf_write(&client_ibuf.w) < 0)
 | 
			
		||||
		if (msgbuf_write(&client_ibuf.w) < 0 && errno != EAGAIN)
 | 
			
		||||
			goto lost_server;
 | 
			
		||||
	}
 | 
			
		||||
 | 
			
		||||
 
 | 
			
		||||
@@ -19,6 +19,7 @@
 | 
			
		||||
#include <sys/types.h>
 | 
			
		||||
#include <sys/ioctl.h>
 | 
			
		||||
 | 
			
		||||
#include <errno.h>
 | 
			
		||||
#include <event.h>
 | 
			
		||||
#include <fcntl.h>
 | 
			
		||||
#include <paths.h>
 | 
			
		||||
@@ -222,7 +223,8 @@ server_client_callback(int fd, short events, void *data)
 | 
			
		||||
		return;
 | 
			
		||||
 | 
			
		||||
	if (fd == c->ibuf.fd) {
 | 
			
		||||
		if (events & EV_WRITE && msgbuf_write(&c->ibuf.w) < 0)
 | 
			
		||||
		if (events & EV_WRITE && msgbuf_write(&c->ibuf.w) < 0 &&
 | 
			
		||||
		    errno != EAGAIN)
 | 
			
		||||
			goto client_lost;
 | 
			
		||||
 | 
			
		||||
		if (c->flags & CLIENT_BAD) {
 | 
			
		||||
 
 | 
			
		||||
		Reference in New Issue
	
	Block a user