r2286 - trunk/varnish-cache/bin/varnishd

phk at projects.linpro.no phk at projects.linpro.no
Fri Dec 7 13:03:59 CET 2007


Author: phk
Date: 2007-12-07 13:03:58 +0100 (Fri, 07 Dec 2007)
New Revision: 2286

Modified:
   trunk/varnish-cache/bin/varnishd/mgt_cli.c
   trunk/varnish-cache/bin/varnishd/mgt_event.h
Log:
TCP connections don't quite behave like other fds, and we need to handle
that for the managers CLI event-engine:

React to POLLNVAL as we would to POLLHUP


Modified: trunk/varnish-cache/bin/varnishd/mgt_cli.c
===================================================================
--- trunk/varnish-cache/bin/varnishd/mgt_cli.c	2007-11-23 10:47:16 UTC (rev 2285)
+++ trunk/varnish-cache/bin/varnishd/mgt_cli.c	2007-12-07 12:03:58 UTC (rev 2286)
@@ -301,7 +301,7 @@
 
 	CAST_OBJ_NOTNULL(cp, e->priv, CLI_PORT_MAGIC);
 
-	if (what & (EV_ERR | EV_HUP))
+	if (what & (EV_ERR | EV_HUP | EV_GONE))
 		goto cli_close;
 
 	/* grow the buffer if it is full */

Modified: trunk/varnish-cache/bin/varnishd/mgt_event.h
===================================================================
--- trunk/varnish-cache/bin/varnishd/mgt_event.h	2007-11-23 10:47:16 UTC (rev 2285)
+++ trunk/varnish-cache/bin/varnishd/mgt_event.h	2007-12-07 12:03:58 UTC (rev 2286)
@@ -50,6 +50,7 @@
 #define		EV_WR	POLLOUT
 #define		EV_ERR	POLLERR
 #define		EV_HUP	POLLHUP
+#define		EV_GONE	POLLNVAL
 #define		EV_SIG	-1
 	int		sig;
 	unsigned	sig_flags;




More information about the varnish-commit mailing list