mirror of
http://git.haproxy.org/git/haproxy.git/
synced 2025-01-12 08:49:29 +00:00
MINOR: muxes: Don't handle proto upgrade for muxes not supporting it
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..
This commit is contained in:
parent
7c452ccbff
commit
4e61096e30
@ -845,9 +845,7 @@ static void fcgi_release(struct fcgi_conn *fconn)
|
||||
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);
|
||||
|
||||
@ -3576,8 +3574,10 @@ static void fcgi_destroy(void *ctx)
|
||||
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);
|
||||
}
|
||||
}
|
||||
|
||||
/*
|
||||
|
@ -1166,9 +1166,7 @@ static void h2_release(struct h2c *h2c)
|
||||
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);
|
||||
@ -4350,8 +4348,10 @@ static void h2_destroy(void *ctx)
|
||||
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);
|
||||
}
|
||||
|
||||
|
@ -502,9 +502,7 @@ static void qc_release(struct qcc *qcc)
|
||||
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);
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user