]> err.no Git - varnish/commitdiff
Check for a negative return from HTC_Rx(). Probably needs revisiting.
authordes <des@d4fa192b-c00b-0410-8231-f00ffab90ce4>
Tue, 23 Oct 2007 12:36:34 +0000 (12:36 +0000)
committerdes <des@d4fa192b-c00b-0410-8231-f00ffab90ce4>
Tue, 23 Oct 2007 12:36:34 +0000 (12:36 +0000)
git-svn-id: svn+ssh://projects.linpro.no/svn/varnish/trunk@2162 d4fa192b-c00b-0410-8231-f00ffab90ce4

varnish-cache/bin/varnishd/cache_fetch.c

index 067749d4f940fcafaf1e58e742f3e6720c5a10bc..a3f1ea93cd95eb386e1becf7b654851bdae84c96 100644 (file)
@@ -331,6 +331,13 @@ Fetch(struct sess *sp)
                i = HTC_Rx(htc);
        while (i == 0);
 
+       if (i < 0) {
+               VBE_UpdateHealth(sp, vc, -1);
+               VBE_ClosedFd(sp->wrk, vc);
+               /* XXX: other cleanup ? */
+               return (__LINE__);
+       }
+
        if (http_DissectResponse(sp->wrk, htc, hp)) {
                VBE_UpdateHealth(sp, vc, -2);
                VBE_ClosedFd(sp->wrk, vc);