Commit 0ccbd832 authored by Poul-Henning Kamp's avatar Poul-Henning Kamp

Move the closing of VDI connection to also cover successful IMS fetches.

Spotted by:	scoof
parent a68bedb6
...@@ -498,14 +498,6 @@ vbf_stp_fetch(struct worker *wrk, struct busyobj *bo) ...@@ -498,14 +498,6 @@ vbf_stp_fetch(struct worker *wrk, struct busyobj *bo)
bo->t_body = VTIM_mono(); 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->bereq);
http_Teardown(bo->beresp); http_Teardown(bo->beresp);
...@@ -721,6 +713,14 @@ vbf_fetch_thread(struct worker *wrk, void *priv) ...@@ -721,6 +713,14 @@ vbf_fetch_thread(struct worker *wrk, void *priv)
} }
assert(WRW_IsReleased(wrk)); 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) if (bo->state == BOS_FAILED)
assert(bo->fetch_objcore->flags & OC_F_FAILED); assert(bo->fetch_objcore->flags & OC_F_FAILED);
......
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