r2086 - trunk/varnish-cache/bin/varnishd

phk at projects.linpro.no phk at projects.linpro.no
Mon Oct 8 12:25:47 CEST 2007


Author: phk
Date: 2007-10-08 12:25:47 +0200 (Mon, 08 Oct 2007)
New Revision: 2086

Modified:
   trunk/varnish-cache/bin/varnishd/cache_pipe.c
Log:
Drop the asserts around shutdown(2), there are a number of
legitimate error conditions.


Modified: trunk/varnish-cache/bin/varnishd/cache_pipe.c
===================================================================
--- trunk/varnish-cache/bin/varnishd/cache_pipe.c	2007-10-08 09:34:36 UTC (rev 2085)
+++ trunk/varnish-cache/bin/varnishd/cache_pipe.c	2007-10-08 10:25:47 UTC (rev 2086)
@@ -112,25 +112,25 @@
 		if (i < 1) 
 			break;
 		if (fds[0].revents && rdf(vc->fd, sp->fd)) {
-			AZ(shutdown(vc->fd, SHUT_RD));
-			AZ(shutdown(sp->fd, SHUT_WR));
+			shutdown(vc->fd, SHUT_RD);
+			shutdown(sp->fd, SHUT_WR);
 			fds[0].events = 0;
 			fds[0].fd = -1;
 		}
 		if (fds[1].revents && rdf(sp->fd, vc->fd)) {
-			AZ(shutdown(sp->fd, SHUT_RD));
-			AZ(shutdown(vc->fd, SHUT_WR));
+			shutdown(sp->fd, SHUT_RD);
+			shutdown(vc->fd, SHUT_WR);
 			fds[1].events = 0;
 			fds[1].fd = -1;
 		}
 	}
 	if (fds[0].fd >= 0) {
-		AZ(shutdown(vc->fd, SHUT_RD));
-		AZ(shutdown(sp->fd, SHUT_WR));
+		shutdown(vc->fd, SHUT_RD);
+		shutdown(sp->fd, SHUT_WR);
 	}
 	if (fds[1].fd >= 0) {
-		AZ(shutdown(sp->fd, SHUT_RD));
-		AZ(shutdown(vc->fd, SHUT_WR));
+		shutdown(sp->fd, SHUT_RD);
+		shutdown(vc->fd, SHUT_WR);
 	}
 	vca_close_session(sp, "pipe");
 	VBE_ClosedFd(sp->wrk, vc);




More information about the varnish-commit mailing list