Several muxes (h2, fcgi, quic) don't support the protocol upgrade. For these
muxes, there is no reason to have code to support it. Thus in the destroy
callback, there is now a BUG_ON() and the release function is simplified
because the connection is always owned by the mux..
TRACE_POINT(FCGI_EV_FCONN_END);
if (fconn) {
- /* The connection must be attached to this mux to be released */
- if (fconn->conn && fconn->conn->ctx == fconn)
- conn = fconn->conn;
+ conn = fconn->conn;
TRACE_DEVEL("freeing fconn", FCGI_EV_FCONN_END, conn);
struct fcgi_conn *fconn = ctx;
TRACE_POINT(FCGI_EV_FCONN_END, fconn->conn);
- if (eb_is_empty(&fconn->streams_by_id) || fconn->conn->ctx != fconn)
+ if (eb_is_empty(&fconn->streams_by_id)) {
+ BUG_ON(fconn->conn->ctx != fconn);
fcgi_release(fconn);
+ }
}
/*
TRACE_ENTER(H2_EV_H2C_END);
if (h2c) {
- /* The connection must be aattached to this mux to be released */
- if (h2c->conn && h2c->conn->ctx == h2c)
- conn = h2c->conn;
+ conn = h2c->conn;
TRACE_DEVEL("freeing h2c", H2_EV_H2C_END, conn);
hpack_dht_free(h2c->ddht);
struct h2c *h2c = ctx;
TRACE_ENTER(H2_EV_H2C_END, h2c->conn);
- if (eb_is_empty(&h2c->streams_by_id) || h2c->conn->ctx != h2c)
+ if (eb_is_empty(&h2c->streams_by_id)) {
+ BUG_ON(h2c->conn->ctx != h2c);
h2_release(h2c);
+ }
TRACE_LEAVE(H2_EV_H2C_END);
}
if (qcc) {
struct eb64_node *node;
- /* The connection must be aattached to this mux to be released */
- if (qcc->conn && qcc->conn->ctx == qcc)
- conn = qcc->conn;
+ conn = qcc->conn;
TRACE_DEVEL("freeing qcc", QMUX_EV_QCC_END, conn);