Partly revert "Close VDPs for error conditions in cnt_transmit()"

This reverts the code change from commit 6d423aa5,
keeps the test case and adds a VDP_Close() for the case that the
transport deliver function is not called.

Part 2 of the fix for #4067

Conflicts:
	bin/varnishd/cache/cache_req_fsm.c
parent 2d494dc7
......@@ -467,6 +467,8 @@ cnt_transmit(struct worker *wrk, struct req *req)
VCL_StackVDP(req, req->vcl, req->vdp_filter_list)) {
VSLb(req->vsl, SLT_Error, "Failure to push processors");
req->doclose = SC_OVERLOAD;
req->acct.resp_bodybytes +=
VDP_Close(req->vdc, req->objcore, boc);
} else {
if (status < 200 || status == 204) {
// rfc7230,l,1691,1695
......@@ -504,9 +506,6 @@ cnt_transmit(struct worker *wrk, struct req *req)
req->doclose = SC_TX_ERROR;
}
if (req->doclose != SC_NULL)
req->acct.resp_bodybytes += VDP_Close(req->vdc, req->objcore, boc);
if (boc != NULL)
HSH_DerefBoc(wrk, req->objcore);
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment