mirror of
https://git.haproxy.org/git/haproxy.git/
synced 2025-08-05 14:47:07 +02:00
MINOR: mux-quic: release conn after shutdown on BE reuse failure
On stream detach on backend side, connection is inserted in the proper server/session list to be able to reuse it later. If insertion fails and the connection is idle, the connection can be removed immediately. If this occurs on a QUIC connection, QUIC MUX implements graceful shutdown to ensure the server is notified of the closure. However, the connection instance is not freed. Change this to ensure that both shutdown and release is performed.
This commit is contained in:
parent
14966c856b
commit
cfe9bec1ea
@ -3791,10 +3791,8 @@ static void qmux_strm_detach(struct sedesc *sd)
|
||||
if (!session_add_conn(sess, conn, conn->target)) {
|
||||
TRACE_ERROR("error during connection insert into session list", QMUX_EV_STRM_END, conn);
|
||||
conn->owner = NULL;
|
||||
if (!qcc->nb_sc) {
|
||||
qcc_shutdown(qcc);
|
||||
goto end;
|
||||
}
|
||||
if (!qcc->nb_sc)
|
||||
goto release;
|
||||
}
|
||||
|
||||
/* If conn is idle, check if session can keep it. Conn is freed if this is not the case.
|
||||
@ -3812,8 +3810,9 @@ static void qmux_strm_detach(struct sedesc *sd)
|
||||
if (!srv_add_to_idle_list(objt_server(conn->target), conn, 1)) {
|
||||
/* Idle conn insert failure, gracefully close the connection. */
|
||||
TRACE_DEVEL("idle connection cannot be kept on the server", QMUX_EV_STRM_END, conn);
|
||||
qcc_shutdown(qcc);
|
||||
goto release;
|
||||
}
|
||||
|
||||
goto end;
|
||||
}
|
||||
else if (!conn->hash_node->node.node.leaf_p &&
|
||||
|
Loading…
Reference in New Issue
Block a user