[master] 0ccbd83 Move the closing of VDI connection to also cover successful IMS fetches.
Poul-Henning Kamp
phk at FreeBSD.org
Mon Feb 10 00:05:54 CET 2014
commit 0ccbd8320692becd41f27061737dbfede593550d
Author: Poul-Henning Kamp <phk at FreeBSD.org>
Date: Sun Feb 9 23:05:28 2014 +0000
Move the closing of VDI connection to also cover successful IMS fetches.
Spotted by: scoof
diff --git a/bin/varnishd/cache/cache_fetch.c b/bin/varnishd/cache/cache_fetch.c
index 9254c8e..819c39f 100644
--- a/bin/varnishd/cache/cache_fetch.c
+++ b/bin/varnishd/cache/cache_fetch.c
@@ -498,14 +498,6 @@ vbf_stp_fetch(struct worker *wrk, struct busyobj *bo)
bo->t_body = VTIM_mono();
- if (bo->vbc != NULL) {
- if (bo->should_close)
- VDI_CloseFd(&bo->vbc);
- else
- VDI_RecycleFd(&bo->vbc);
- AZ(bo->vbc);
- }
-
http_Teardown(bo->bereq);
http_Teardown(bo->beresp);
@@ -721,6 +713,14 @@ vbf_fetch_thread(struct worker *wrk, void *priv)
}
assert(WRW_IsReleased(wrk));
+ if (bo->vbc != NULL) {
+ if (bo->should_close)
+ VDI_CloseFd(&bo->vbc);
+ else
+ VDI_RecycleFd(&bo->vbc);
+ AZ(bo->vbc);
+ }
+
if (bo->state == BOS_FAILED)
assert(bo->fetch_objcore->flags & OC_F_FAILED);
More information about the varnish-commit
mailing list