]> git.ipfire.org Git - thirdparty/haproxy.git/commitdiff
MINOR: checks: use conn_full_close() instead of conn_force_close()
authorWilly Tarreau <w@1wt.eu>
Thu, 5 Oct 2017 15:53:13 +0000 (17:53 +0200)
committerWilly Tarreau <w@1wt.eu>
Sun, 22 Oct 2017 07:54:17 +0000 (09:54 +0200)
There's no point in using conn_force_close() in the checks since they
do not use XPRT_TRACKED so both functions are equivalent.

src/checks.c

index b61f27ae34bfa5bb8c562ba8753e6ee8d04b98e9..e6cc42a1c3a8239b6c59f5607e885dfeadeb227d 100644 (file)
@@ -1383,7 +1383,7 @@ static int wake_srv_chk(struct connection *conn)
                 * sure want to abort the hard way.
                 */
                conn_sock_drain(conn);
-               conn_force_close(conn);
+               conn_full_close(conn);
                ret = -1;
        }
 
@@ -2164,7 +2164,7 @@ static struct task *process_chk_conn(struct task *t)
                         * server state to be suddenly changed.
                         */
                        conn_sock_drain(conn);
-                       conn_force_close(conn);
+                       conn_full_close(conn);
                }
 
                if (conn) {
@@ -2640,7 +2640,7 @@ static int tcpcheck_main(struct check *check)
                         *   3: release and replace the old one on success
                         */
                        if (check->conn) {
-                               conn_force_close(check->conn);
+                               conn_full_close(check->conn);
                                retcode = -1; /* do not reuse the fd! */
                        }