MINOR: mux-quic: define release app-ops
Define a new callback release inside qcc_app_ops. It is called when the qcc MUX is freed via qc_release. This will allows to implement cleaning on the app layer.
This commit is contained in:
parent
dccbd733f0
commit
cbc13b71c6
@ -118,6 +118,7 @@ struct qcc_app_ops {
|
||||
int (*decode_qcs)(struct qcs *qcs, int fin, void *ctx);
|
||||
size_t (*snd_buf)(struct conn_stream *cs, struct buffer *buf, size_t count, int flags);
|
||||
int (*finalize)(void *ctx);
|
||||
void (*release)(void *ctx);
|
||||
};
|
||||
|
||||
#endif /* USE_QUIC */
|
||||
|
@ -481,6 +481,9 @@ static void qc_release(struct qcc *qcc)
|
||||
|
||||
TRACE_DEVEL("freeing qcc", QMUX_EV_QCC_END, conn);
|
||||
|
||||
if (qcc->app_ops && qcc->app_ops->release)
|
||||
qcc->app_ops->release(qcc->ctx);
|
||||
|
||||
if (qcc->wait_event.tasklet)
|
||||
tasklet_free(qcc->wait_event.tasklet);
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user