Commit 5e06e03b authored by Dag Haavi Finstad's avatar Dag Haavi Finstad

Drop VTP_Wait call in vbe_dir_finish

With VTP_Close now being capable of dealing with STOLEN connections, we
no longer need to VTP_Wait for them prior to close.
parent 71179430
......@@ -178,13 +178,15 @@ vbe_dir_finish(const struct director *d, struct worker *wrk,
CAST_OBJ_NOTNULL(vtp, bo->htc->priv, VTP_MAGIC);
bo->htc->priv = NULL;
if (vtp->state != VTP_STATE_USED)
VTP_Wait(wrk, vtp);
assert(bo->htc->doclose == SC_TX_PIPE);
if (bo->htc->doclose != SC_NULL || bp->proxy_header != 0) {
VSLb(bo->vsl, SLT_BackendClose, "%d %s", vtp->fd,
bp->director->display_name);
VTP_Close(&vtp);
AZ(vtp);
Lck_Lock(&bp->mtx);
} else {
assert (vtp->state == VTP_STATE_USED);
VSLb(bo->vsl, SLT_BackendReuse, "%d %s", vtp->fd,
bp->director->display_name);
Lck_Lock(&bp->mtx);
......
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