[master] f766f17 For esi-child + gzip, wait for BOS_Finished rather than for busyobj pointer to disappear.

Poul-Henning Kamp phk at FreeBSD.org
Mon Oct 20 10:51:09 CEST 2014


commit f766f17fc6bec17ff53fefef49aa28bf85fec594
Author: Poul-Henning Kamp <phk at FreeBSD.org>
Date:   Mon Oct 20 08:50:01 2014 +0000

    For esi-child + gzip, wait for BOS_Finished rather than for busyobj
    pointer to disappear.

diff --git a/bin/varnishd/http1/cache_http1_deliver.c b/bin/varnishd/http1/cache_http1_deliver.c
index 0e63c41..7759581 100644
--- a/bin/varnishd/http1/cache_http1_deliver.c
+++ b/bin/varnishd/http1/cache_http1_deliver.c
@@ -338,10 +338,8 @@ V1D_Deliver(struct req *req, struct busyobj *bo)
 		ESI_Deliver(req);
 	} else if (req->res_mode & RES_ESI_CHILD && req->gzip_resp) {
 		l = -1;
-		while (req->objcore->busyobj) {
-			assert(bo != NULL);
-			l = VBO_waitlen(req->wrk, bo, l);
-		}
+		if (bo != NULL)
+			VBO_waitstate(bo, BOS_FINISHED);
 		ESI_DeliverChild(req);
 	} else if (req->res_mode & RES_GUNZIP ||
 	    (req->res_mode & RES_ESI_CHILD &&



More information about the varnish-commit mailing list