Skip to content

Commit

Permalink
do not count deliberately ending the backend connection as fetch failure
Browse files Browse the repository at this point in the history
now that we pass the bo's handling to the director method, in the case
of return(error) from v_b_f, we do no not want the deliberate
VDI_Finish() to change the handling from vcl.
  • Loading branch information
nigoroll committed Nov 6, 2019
1 parent 0109411 commit e1853a3
Showing 1 changed file with 7 additions and 0 deletions.
7 changes: 7 additions & 0 deletions bin/varnishd/cache/cache_fetch.c
Original file line number Diff line number Diff line change
Expand Up @@ -286,6 +286,7 @@ vbf_stp_startfetch(struct worker *wrk, struct busyobj *bo)
{
int i;
vtim_real now;
unsigned handling;

CHECK_OBJ_NOTNULL(wrk, WORKER_MAGIC);
CHECK_OBJ_NOTNULL(bo, BUSYOBJ_MAGIC);
Expand Down Expand Up @@ -416,9 +417,15 @@ vbf_stp_startfetch(struct worker *wrk, struct busyobj *bo)

if (wrk->handling == VCL_RET_ABANDON || wrk->handling == VCL_RET_FAIL ||
wrk->handling == VCL_RET_ERROR) {
/* do not count deliberately ending the backend connection as
* fetch failure
*/
handling = wrk->handling;
if (bo->htc)
bo->htc->doclose = SC_RESP_CLOSE;
vbf_cleanup(bo);
wrk->handling = handling;

if (wrk->handling == VCL_RET_ERROR)
return (F_STP_ERROR);
else
Expand Down

0 comments on commit e1853a3

Please sign in to comment.