Commit 89769581 authored by Dridi Boukelmoune's avatar Dridi Boukelmoune

vbe: Generic sanity check of non-recyclable connections

The reason we expect here can be summarized as: this was a pipe
transaction or an error occurred. This could be much simpler if
we replaced enum sess_close with a struct stream_close instead.

Refs dc5bddbd
parent afd75928
......@@ -231,9 +231,15 @@ vbe_dir_finish(VRT_CTX, VCL_BACKEND d)
CHECK_OBJ_NOTNULL(bo->htc, HTTP_CONN_MAGIC);
pfd = bo->htc->priv;
bo->htc->priv = NULL;
if (PFD_State(pfd) != PFD_STATE_USED)
assert(bo->htc->doclose == SC_TX_PIPE ||
bo->htc->doclose == SC_RX_TIMEOUT);
if (PFD_State(pfd) != PFD_STATE_USED) {
AN(bo->htc->doclose);
if (bo->htc->doclose != SC_TX_PIPE) {
#define SESS_CLOSE(U, l, err, desc) \
if (bo->htc->doclose == SC_ ## U) \
AN(err);
#include "tbl/sess_close.h"
}
}
if (bo->htc->doclose != SC_NULL || bp->proxy_header != 0) {
VSLb(bo->vsl, SLT_BackendClose, "%d %s close", *PFD_Fd(pfd),
VRT_BACKEND_string(bp->director));
......
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