From: Willy Tarreau Date: Thu, 5 Oct 2017 15:49:56 +0000 (+0200) Subject: MINOR: connection: remove conn_force_close() X-Git-Tag: v1.8-dev3~2 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=cbc6524a198400b96c28d226a0a042687b622dc0;p=thirdparty%2Fhaproxy.git MINOR: connection: remove conn_force_close() Now only conn_full_close() will be used. It will become more obvious when the tracking is in place or not and will make it easier to convert remaining call places to conn_streams. --- diff --git a/include/proto/connection.h b/include/proto/connection.h index 7fdee7c54f..3fcba26577 100644 --- a/include/proto/connection.h +++ b/include/proto/connection.h @@ -150,22 +150,6 @@ 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. - */ -static inline void conn_force_close(struct connection *conn) -{ - if (conn_xprt_ready(conn) && conn->xprt->close) - conn->xprt->close(conn); - - if (conn_ctrl_ready(conn)) - fd_delete(conn->handle.fd); - - conn->handle.fd = DEAD_FD_MAGIC; - conn->flags &= ~(CO_FL_XPRT_READY|CO_FL_CTRL_READY); -} - /* Update polling on connection 's file descriptor depending on its current * state as reported in the connection's CO_FL_CURR_* flags, reports of EAGAIN * in CO_FL_WAIT_*, and the sock layer expectations indicated by CO_FL_SOCK_*.