From 45ad58a686ec29ff5db4b2a7de842a1d59e32fb8 Mon Sep 17 00:00:00 2001 From: phk Date: Mon, 8 Oct 2007 10:33:46 +0000 Subject: [PATCH] Catch EOF on reads instead of looping. git-svn-id: svn+ssh://projects.linpro.no/svn/varnish/trunk@2087 d4fa192b-c00b-0410-8231-f00ffab90ce4 --- varnish-cache/bin/varnishd/cache_httpconn.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) 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); } -- 2.39.5