]> git.ipfire.org Git - thirdparty/haproxy.git/commitdiff
MINOR: tcp: use conn_full_close() instead of conn_force_close()
authorWilly Tarreau <w@1wt.eu>
Thu, 5 Oct 2017 16:01:29 +0000 (18:01 +0200)
committerWilly Tarreau <w@1wt.eu>
Sun, 22 Oct 2017 07:54:16 +0000 (09:54 +0200)
There's no point in using conn_force_close() in outgoing connect()
since XPRT_TRACKED is not set so both functions are equivalent.

src/proto_tcp.c

index ff800c822132c81a58f2a259f56731ff923e6970..e4e6483db00d3367237fe33dd3b1cd6302563efb 100644 (file)
@@ -545,7 +545,7 @@ int tcp_connect_server(struct connection *conn, int data, int delack)
        fdtab[fd].linger_risk = 1;  /* close hard if needed */
 
        if (conn_xprt_init(conn) < 0) {
-               conn_force_close(conn);
+               conn_full_close(conn);
                conn->flags |= CO_FL_ERROR;
                return SF_ERR_RESOURCE;
        }