From: Willy Tarreau Date: Thu, 5 Oct 2017 16:09:20 +0000 (+0200) Subject: MINOR: connection: add conn_stop_tracking() to disable tracking X-Git-Tag: v1.8-dev3~11 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=dc42acddb662014a4bce640b098951ad5dec332c;p=thirdparty%2Fhaproxy.git MINOR: connection: add conn_stop_tracking() to disable tracking This will be used before conn_full_close() instead of using conn_force_close(), resulting in a clearer exit path in various situations. --- diff --git a/include/proto/connection.h b/include/proto/connection.h index dd19714d03..7fdee7c54f 100644 --- a/include/proto/connection.h +++ b/include/proto/connection.h @@ -142,6 +142,14 @@ static inline void conn_full_close(struct connection *conn) conn_ctrl_close(conn); } +/* stop tracking a connection, allowing conn_full_close() to always + * succeed. + */ +static inline void conn_stop_tracking(struct connection *conn) +{ + conn->flags &= ~CO_FL_XPRT_TRACKED; +} + /* Force to close the connection whatever the tracking state. This is mainly * used on the error path where the tracking does not make sense, or to kill * an idle connection we want to abort immediately.