[master] 03af8e7b9 Use bo->no_retry to prevent automatic retry on dead connections.

Poul-Henning Kamp phk at FreeBSD.org
Fri Feb 21 05:22:09 UTC 2020


commit 03af8e7b91b5fa47d39759fba7f737f0148307b7
Author: Poul-Henning Kamp <phk at FreeBSD.org>
Date:   Wed Feb 19 18:47:01 2020 +0000

    Use bo->no_retry to prevent automatic retry on dead connections.

diff --git a/bin/varnishd/cache/cache_backend.c b/bin/varnishd/cache/cache_backend.c
index 1ce50846c..0a685a4f3 100644
--- a/bin/varnishd/cache/cache_backend.c
+++ b/bin/varnishd/cache/cache_backend.c
@@ -319,9 +319,7 @@ vbe_dir_gethdrs(VRT_CTX, VCL_BACKEND d)
 		AZ(bo->htc);
 		if (i < 0 || extrachance == 0)
 			break;
-		if (bo->req != NULL &&
-		    bo->req->req_body_status != REQ_BODY_NONE &&
-		    bo->req->req_body_status != REQ_BODY_CACHED)
+		if (bo->no_retry != NULL)
 			break;
 		VSC_C_main->backend_retry++;
 	} while (extrachance--);


More information about the varnish-commit mailing list