Commit 06c03e63 authored by Poul-Henning Kamp's avatar Poul-Henning Kamp

Fail gracefully on Rx error



git-svn-id: http://www.varnish-cache.org/svn/trunk/varnish-cache@4193 d4fa192b-c00b-0410-8231-f00ffab90ce4
parent c393c8ac
......@@ -326,7 +326,9 @@ http_rxchar_eof(struct http *hp, int n)
i = read(hp->fd, hp->rxbuf + hp->prxbuf, n);
if (i == 0)
return (i);
assert(i > 0);
if (i <= 0)
vtc_log(hp->vl, 0, "HTTP rx failed (%s)",
strerror(errno));
hp->prxbuf += i;
hp->rxbuf[hp->prxbuf] = '\0';
n -= i;
......
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