r4193 - trunk/varnish-cache/bin/varnishtest
    phk at projects.linpro.no 
    phk at projects.linpro.no
       
    Tue Aug 18 12:35:19 CEST 2009
    
    
  
Author: phk
Date: 2009-08-18 12:35:18 +0200 (Tue, 18 Aug 2009)
New Revision: 4193
Modified:
   trunk/varnish-cache/bin/varnishtest/vtc_http.c
Log:
Fail gracefully on Rx error
Modified: trunk/varnish-cache/bin/varnishtest/vtc_http.c
===================================================================
--- trunk/varnish-cache/bin/varnishtest/vtc_http.c	2009-08-18 10:12:32 UTC (rev 4192)
+++ trunk/varnish-cache/bin/varnishtest/vtc_http.c	2009-08-18 10:35:18 UTC (rev 4193)
@@ -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