diff --git a/include/haproxy/conn_stream.h b/include/haproxy/conn_stream.h index c9c3d6e4b..a89104b17 100644 --- a/include/haproxy/conn_stream.h +++ b/include/haproxy/conn_stream.h @@ -110,12 +110,13 @@ static inline void cs_attach_app(struct conn_stream *cs, enum obj_type *app, voi cs->data_cb = data_cb; } -/* Detach the conn_stream from the connection, if any. If a mux owns the - * connection ->detach() callback is called. Otherwise, it means the conn-stream - * owns the connection. In this case the connection is closed and released. The - * conn-stream is not released. +/* Detach the conn_stream from the endpoint, if any. For a connecrion, if a mux + * owns the connection ->detach() callback is called. Otherwise, it means the + * conn-stream owns the connection. In this case the connection is closed and + * released. For an applet, the appctx is released. At the end, the conn-stream + * is not released but some fields a reset. */ -static inline void cs_detach(struct conn_stream *cs) +static inline void cs_detach_endp(struct conn_stream *cs) { struct connection *conn; struct appctx *appctx; @@ -150,7 +151,7 @@ static inline void cs_detach(struct conn_stream *cs) /* Release a conn_stream */ static inline void cs_destroy(struct conn_stream *cs) { - cs_detach(cs); + cs_detach_endp(cs); cs_free(cs); } diff --git a/include/haproxy/stream_interface.h b/include/haproxy/stream_interface.h index c5fd39311..5236ffd07 100644 --- a/include/haproxy/stream_interface.h +++ b/include/haproxy/stream_interface.h @@ -148,7 +148,7 @@ static inline void si_reset_endpoint(struct stream_interface *si) if (cs_conn_mux(si->cs) && si->wait_event.events != 0) (cs_conn_mux(si->cs))->unsubscribe(si->cs, si->wait_event.events, &si->wait_event); - cs_detach(si->cs); + cs_detach_endp(si->cs); si->ops = &si_embedded_ops; }