From: phk Date: Mon, 8 Oct 2007 10:33:46 +0000 (+0000) Subject: Catch EOF on reads instead of looping. X-Git-Url: https://err.no/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=45ad58a686ec29ff5db4b2a7de842a1d59e32fb8;p=varnish Catch EOF on reads instead of looping. git-svn-id: svn+ssh://projects.linpro.no/svn/varnish/trunk@2087 d4fa192b-c00b-0410-8231-f00ffab90ce4 --- diff --git a/varnish-cache/bin/varnishd/cache_httpconn.c b/varnish-cache/bin/varnishd/cache_httpconn.c index 2129e59d..ce6d8af4 100644 --- a/varnish-cache/bin/varnishd/cache_httpconn.c +++ b/varnish-cache/bin/varnishd/cache_httpconn.c @@ -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); }