mirror of
https://github.com/haproxy/haproxy.git
synced 2026-04-15 21:59:41 -04:00
MINOR: quic: Release asap quic_conn memory from ->close() xprt callback.
Add a condition to release asap the quic_conn memory when the connection is in "connection close" state from ->close() QUIC xprt callback.
This commit is contained in:
parent
b930ff03d6
commit
ab95230200
1 changed files with 4 additions and 2 deletions
|
|
@ -28,8 +28,10 @@ static void quic_close(struct connection *conn, void *xprt_ctx)
|
|||
/* Next application data can be dropped. */
|
||||
qc->mux_state = QC_MUX_RELEASED;
|
||||
|
||||
/* If the quic-conn timer has already expired free the quic-conn. */
|
||||
if (qc->flags & QUIC_FL_CONN_EXP_TIMER) {
|
||||
/* If the quic-conn timer has already expired or if already in "connection close"
|
||||
* state, free the quic-conn.
|
||||
*/
|
||||
if (qc->flags & (QUIC_FL_CONN_EXP_TIMER|QUIC_FL_CONN_CLOSING)) {
|
||||
quic_conn_release(qc);
|
||||
qc = NULL;
|
||||
goto leave;
|
||||
|
|
|
|||
Loading…
Reference in a new issue