r2153 - trunk/varnish-cache/bin/varnishd

des at projects.linpro.no des at projects.linpro.no
Fri Oct 19 15:58:12 CEST 2007


Author: des
Date: 2007-10-19 15:58:12 +0200 (Fri, 19 Oct 2007)
New Revision: 2153

Modified:
   trunk/varnish-cache/bin/varnishd/mgt_cli.c
Log:
Don't assert that close() returns 0, it won't when the remote end closes
the connection first.  This fixes #168.


Modified: trunk/varnish-cache/bin/varnishd/mgt_cli.c
===================================================================
--- trunk/varnish-cache/bin/varnishd/mgt_cli.c	2007-10-19 13:49:43 UTC (rev 2152)
+++ trunk/varnish-cache/bin/varnishd/mgt_cli.c	2007-10-19 13:58:12 UTC (rev 2153)
@@ -346,10 +346,10 @@
 cli_close:
 	vsb_delete(cp->cli->sb);
 	free(cp->buf);
-	AZ(close(cp->fdi));
+	(void)close(cp->fdi);
 	if (cp->fdi == 0)
 		assert(open("/dev/null", O_RDONLY) == 0);
-	AZ(close(cp->fdo));
+	(void)close(cp->fdo);
 	if (cp->fdo == 1) {
 		assert(open("/dev/null", O_WRONLY) == 1);
 		close(2);




More information about the varnish-commit mailing list