mirror of
https://git.haproxy.org/git/haproxy.git/
synced 2025-09-25 07:41:36 +02:00
Revert "BUG/MEDIUM: H1: When upgrading, make sure we don't free the buffer too early."
This reverts commit 6c7fe5c3700fac7cc945b2b756df30874cbf77a6. This patch was harmless, but not needed, conn_upgrade_mux_fe() already takes care of setting the buffer to BUF_NULL.
This commit is contained in:
parent
86fcf6d6cd
commit
45c4437b4a
@ -464,18 +464,16 @@ static void h1_release(struct h1c *h1c)
|
|||||||
conn = h1c->conn;
|
conn = h1c->conn;
|
||||||
|
|
||||||
if (conn && h1c->flags & H1C_F_UPG_H2C) {
|
if (conn && h1c->flags & H1C_F_UPG_H2C) {
|
||||||
struct buffer tmpbuf = h1c->ibuf;
|
|
||||||
h1c->flags &= ~H1C_F_UPG_H2C;
|
h1c->flags &= ~H1C_F_UPG_H2C;
|
||||||
h1c->ibuf = BUF_NULL;
|
if (conn_upgrade_mux_fe(conn, NULL, &h1c->ibuf, ist("h2"), PROTO_MODE_HTX) != -1) {
|
||||||
if (conn_upgrade_mux_fe(conn, NULL, &tmpbuf, ist("h2"), PROTO_MODE_HTX) != -1) {
|
|
||||||
/* connection successfully upgraded to H2, this
|
/* connection successfully upgraded to H2, this
|
||||||
* mux was already released */
|
* mux was already released */
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
h1c->ibuf = tmpbuf;
|
|
||||||
sess_log(conn->owner); /* Log if the upgrade failed */
|
sess_log(conn->owner); /* Log if the upgrade failed */
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
if (!LIST_ISEMPTY(&h1c->buf_wait.list)) {
|
if (!LIST_ISEMPTY(&h1c->buf_wait.list)) {
|
||||||
HA_SPIN_LOCK(BUF_WQ_LOCK, &buffer_wq_lock);
|
HA_SPIN_LOCK(BUF_WQ_LOCK, &buffer_wq_lock);
|
||||||
LIST_DEL(&h1c->buf_wait.list);
|
LIST_DEL(&h1c->buf_wait.list);
|
||||||
|
Loading…
x
Reference in New Issue
Block a user