mirror of
https://git.haproxy.org/git/haproxy.git/
synced 2025-08-07 07:37:02 +02:00
MINOR: mux-quic: remove qcc_shutdown() from qcc_release()
Render qcc_release() more generic by removing qcc_shutdown(). This prevents systematic graceful shutdown/CONNECTION_CLOSE emission if only QCC resource deallocation is necessary. For now, qcc_shutdown() is used before every qcc_release() invocation. The only exception is on qmux_destroy stream layer callback. This commit will be useful to reuse qcc_release() in other contexts to simply deallocate a QCC instance.
This commit is contained in:
parent
3811c1de25
commit
3c38bb7ee1
@ -2387,9 +2387,7 @@ static int qcc_io_process(struct qcc *qcc)
|
||||
return 0;
|
||||
}
|
||||
|
||||
/* release function. This one should be called to free all resources allocated
|
||||
* to the mux.
|
||||
*/
|
||||
/* Free all resources allocated for <qcc> connection. */
|
||||
static void qcc_release(struct qcc *qcc)
|
||||
{
|
||||
struct connection *conn = qcc->conn;
|
||||
@ -2397,8 +2395,6 @@ static void qcc_release(struct qcc *qcc)
|
||||
|
||||
TRACE_ENTER(QMUX_EV_QCC_END, conn);
|
||||
|
||||
qcc_shutdown(qcc);
|
||||
|
||||
if (qcc->task) {
|
||||
task_destroy(qcc->task);
|
||||
qcc->task = NULL;
|
||||
@ -2471,6 +2467,7 @@ struct task *qcc_io_cb(struct task *t, void *ctx, unsigned int status)
|
||||
return NULL;
|
||||
|
||||
release:
|
||||
qcc_shutdown(qcc);
|
||||
qcc_release(qcc);
|
||||
TRACE_LEAVE(QMUX_EV_QCC_WAKE);
|
||||
return NULL;
|
||||
@ -2513,6 +2510,7 @@ static struct task *qcc_timeout_task(struct task *t, void *ctx, unsigned int sta
|
||||
*/
|
||||
if (qcc_is_dead(qcc)) {
|
||||
TRACE_STATE("releasing dead connection", QMUX_EV_QCC_WAKE, qcc->conn);
|
||||
qcc_shutdown(qcc);
|
||||
qcc_release(qcc);
|
||||
}
|
||||
|
||||
@ -2710,6 +2708,7 @@ static void qmux_strm_detach(struct sedesc *sd)
|
||||
return;
|
||||
|
||||
release:
|
||||
qcc_shutdown(qcc);
|
||||
qcc_release(qcc);
|
||||
TRACE_LEAVE(QMUX_EV_STRM_END);
|
||||
return;
|
||||
@ -2967,6 +2966,7 @@ static int qmux_wake(struct connection *conn)
|
||||
return 0;
|
||||
|
||||
release:
|
||||
qcc_shutdown(qcc);
|
||||
qcc_release(qcc);
|
||||
TRACE_LEAVE(QMUX_EV_QCC_WAKE);
|
||||
return 1;
|
||||
|
Loading…
Reference in New Issue
Block a user