r1133 - trunk/varnish-cache/bin/varnishd
phk at projects.linpro.no
phk at projects.linpro.no
Fri Sep 29 20:37:02 CEST 2006
Author: phk
Date: 2006-09-29 20:37:02 +0200 (Fri, 29 Sep 2006)
New Revision: 1133
Modified:
trunk/varnish-cache/bin/varnishd/cache_pipe.c
Log:
Don't suffer if one side of a piped connection keeps blasting away.
Modified: trunk/varnish-cache/bin/varnishd/cache_pipe.c
===================================================================
--- trunk/varnish-cache/bin/varnishd/cache_pipe.c 2006-09-27 13:32:18 UTC (rev 1132)
+++ trunk/varnish-cache/bin/varnishd/cache_pipe.c 2006-09-29 18:37:02 UTC (rev 1133)
@@ -49,7 +49,7 @@
char buf[BUFSIZ];
i = read(fds[idx].fd, buf, sizeof buf);
- if (i <= 0) {
+ if (i <= 0 || fds[1-idx].events == 0) {
VSL(SLT_Debug, fds[idx].fd, "Pipe Shut read(read)");
VSL(SLT_Debug, fds[1-idx].fd, "Pipe Shut write(read)");
shutdown(fds[idx].fd, SHUT_RD);
More information about the varnish-commit
mailing list