r2162 - trunk/varnish-cache/bin/varnishd
des at projects.linpro.no
des at projects.linpro.no
Tue Oct 23 14:36:35 CEST 2007
Author: des
Date: 2007-10-23 14:36:34 +0200 (Tue, 23 Oct 2007)
New Revision: 2162
Modified:
trunk/varnish-cache/bin/varnishd/cache_fetch.c
Log:
Check for a negative return from HTC_Rx(). Probably needs revisiting.
Modified: trunk/varnish-cache/bin/varnishd/cache_fetch.c
===================================================================
--- trunk/varnish-cache/bin/varnishd/cache_fetch.c 2007-10-23 12:35:29 UTC (rev 2161)
+++ trunk/varnish-cache/bin/varnishd/cache_fetch.c 2007-10-23 12:36:34 UTC (rev 2162)
@@ -331,6 +331,13 @@
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);
More information about the varnish-commit
mailing list