From: phk Date: Fri, 29 Sep 2006 18:37:02 +0000 (+0000) Subject: Don't suffer if one side of a piped connection keeps blasting away. X-Git-Url: https://err.no/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=d7e20c2bfed14360d4daaaaddc3131e2d47f0e8d;p=varnish Don't suffer if one side of a piped connection keeps blasting away. git-svn-id: svn+ssh://projects.linpro.no/svn/varnish/trunk@1133 d4fa192b-c00b-0410-8231-f00ffab90ce4 --- diff --git a/varnish-cache/bin/varnishd/cache_pipe.c b/varnish-cache/bin/varnishd/cache_pipe.c index 877c9171..49650544 100644 --- a/varnish-cache/bin/varnishd/cache_pipe.c +++ b/varnish-cache/bin/varnishd/cache_pipe.c @@ -49,7 +49,7 @@ rdf(struct pollfd *fds, int idx) 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);