]> err.no Git - varnish/commitdiff
Don't suffer if one side of a piped connection keeps blasting away.
authorphk <phk@d4fa192b-c00b-0410-8231-f00ffab90ce4>
Fri, 29 Sep 2006 18:37:02 +0000 (18:37 +0000)
committerphk <phk@d4fa192b-c00b-0410-8231-f00ffab90ce4>
Fri, 29 Sep 2006 18:37:02 +0000 (18:37 +0000)
git-svn-id: svn+ssh://projects.linpro.no/svn/varnish/trunk@1133 d4fa192b-c00b-0410-8231-f00ffab90ce4

varnish-cache/bin/varnishd/cache_pipe.c

index 877c9171fe17abf94f6967dd7a450b1639ef1e96..496505449d1f64d998b2b6d2f642e89d44297d38 100644 (file)
@@ -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);