]> git.ipfire.org Git - thirdparty/haproxy.git/commitdiff
MINOR: connection: remove conn_force_close()
authorWilly Tarreau <w@1wt.eu>
Thu, 5 Oct 2017 15:49:56 +0000 (17:49 +0200)
committerWilly Tarreau <w@1wt.eu>
Sun, 22 Oct 2017 07:54:19 +0000 (09:54 +0200)
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.

include/proto/connection.h

index 7fdee7c54f1cd79880e6243f999011cf71f25e13..3fcba26577afbb5bf8e01590f5e7fc27e15547bc 100644 (file)
@@ -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 <c>'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_*.