]> err.no Git - varnish/commitdiff
Catch EOF on reads instead of looping.
authorphk <phk@d4fa192b-c00b-0410-8231-f00ffab90ce4>
Mon, 8 Oct 2007 10:33:46 +0000 (10:33 +0000)
committerphk <phk@d4fa192b-c00b-0410-8231-f00ffab90ce4>
Mon, 8 Oct 2007 10:33:46 +0000 (10:33 +0000)
git-svn-id: svn+ssh://projects.linpro.no/svn/varnish/trunk@2087 d4fa192b-c00b-0410-8231-f00ffab90ce4

varnish-cache/bin/varnishd/cache_httpconn.c

index 2129e59d98171b05c30d8e853c23567a9bd8599f..ce6d8af44c58503842ff82563db9b551db4ecdd0 100644 (file)
@@ -144,7 +144,7 @@ HTC_Rx(struct http_conn *htc)
                return (-2);
        }
        i = read(htc->fd, htc->rxbuf.e, i);
-       if (i < 0) {
+       if (i <= 0) {
                WS_ReleaseP(htc->ws, htc->rxbuf.b);
                return (-1);
        }