Skip to content
Permalink
Browse files

do not count deliberately ending the backend connection as fetch failure

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 Aug 8, 2019
1 parent 0109411 commit e1853a3d1caf420bb3b9a151d0ebd01dbb4b6bdf
Showing with 7 additions and 0 deletions.
  1. +7 −0 bin/varnishd/cache/cache_fetch.c
@@ -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);
@@ -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

0 comments on commit e1853a3

Please sign in to comment.
You can’t perform that action at this time.