r4307 - branches/2.0/varnish-cache/bin/varnishtest

tfheen at projects.linpro.no tfheen at projects.linpro.no
Thu Oct 8 16:22:18 CEST 2009


Author: tfheen
Date: 2009-10-08 16:22:17 +0200 (Thu, 08 Oct 2009)
New Revision: 4307

Modified:
   branches/2.0/varnish-cache/bin/varnishtest/vtc_http.c
Log:
Merge r4193: Fail gracefully on Rx error



Modified: branches/2.0/varnish-cache/bin/varnishtest/vtc_http.c
===================================================================
--- branches/2.0/varnish-cache/bin/varnishtest/vtc_http.c	2009-10-08 14:16:41 UTC (rev 4306)
+++ branches/2.0/varnish-cache/bin/varnishtest/vtc_http.c	2009-10-08 14:22:17 UTC (rev 4307)
@@ -326,7 +326,9 @@
 		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;



More information about the varnish-commit mailing list