[master] 2b21621 Also move dropping failed objects to FetchBody()
Poul-Henning Kamp
phk at varnish-cache.org
Tue Mar 13 00:21:47 CET 2012
commit 2b216210df2a797ff959dfdfe0231cf55c43db49
Author: Poul-Henning Kamp <phk at FreeBSD.org>
Date: Mon Mar 12 23:21:27 2012 +0000
Also move dropping failed objects to FetchBody()
diff --git a/bin/varnishd/cache/cache_center.c b/bin/varnishd/cache/cache_center.c
index bc22656..4ad05ff 100644
--- a/bin/varnishd/cache/cache_center.c
+++ b/bin/varnishd/cache/cache_center.c
@@ -917,12 +917,9 @@ cnt_fetchbody(struct sess *sp, struct worker *wrk, struct req *req)
assert(bo->state >= BOS_FAILED);
assert(WRW_IsReleased(wrk));
- AZ(bo->vbc);
- AN(req->director);
if (bo->state == BOS_FAILED) {
- HSH_Drop(wrk, &req->obj);
- AZ(req->obj);
+ req->obj = NULL;
VBO_DerefBusyObj(wrk, &req->busyobj);
req->err_code = 503;
sp->step = STP_ERROR;
diff --git a/bin/varnishd/cache/cache_fetch.c b/bin/varnishd/cache/cache_fetch.c
index 968db87..d9b519d 100644
--- a/bin/varnishd/cache/cache_fetch.c
+++ b/bin/varnishd/cache/cache_fetch.c
@@ -647,6 +647,7 @@ FetchBody(struct worker *wrk, void *priv)
wrk->stats.fetch_failed++;
VDI_CloseFd(&bo->vbc);
obj->len = 0;
+ HSH_Drop(wrk, &obj);
} else {
assert(bo->state == BOS_FETCHING);
More information about the varnish-commit
mailing list