Commit fa81569f authored by Poul-Henning Kamp's avatar Poul-Henning Kamp

Catch EOF on reads instead of looping.


git-svn-id: http://www.varnish-cache.org/svn/trunk/varnish-cache@2087 d4fa192b-c00b-0410-8231-f00ffab90ce4
parent 03c47acf
......@@ -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);
}
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment