]> git.ipfire.org Git - thirdparty/haproxy.git/commitdiff
MINOR: connection: don't check for CO_FL_SOCK_WR_SH too early in handshakes
authorWilly Tarreau <w@1wt.eu>
Thu, 23 Jan 2020 17:08:45 +0000 (18:08 +0100)
committerWilly Tarreau <w@1wt.eu>
Thu, 23 Jan 2020 18:01:37 +0000 (19:01 +0100)
Just like with CO_FL_SOCK_RD_SH, we don't need to check for this flag too
early because conn_sock_send() already does it. No error was lost so it
was harmless, it was only useless code.

src/connection.c
src/stream_interface.c

index 83790a9d9aa4883ef21b60a8bf527f02b113c912..ced919f0e0a5b19d9fba27971badb26a0aecd1a7 100644 (file)
@@ -1003,10 +1003,6 @@ int conn_send_socks4_proxy_request(struct connection *conn)
 {
        struct socks4_request req_line;
 
-       /* we might have been called just after an asynchronous shutw */
-       if (conn->flags & CO_FL_SOCK_WR_SH)
-               goto out_error;
-
        if (!conn_ctrl_ready(conn))
                goto out_error;
 
index 0a2e7d1d0c91b322eaa5c5fac500e97a0209cbcf..14e662711233ddec65c6a27ef85c3328d423a0d2 100644 (file)
@@ -329,10 +329,6 @@ struct appctx *si_register_handler(struct stream_interface *si, struct applet *a
  */
 int conn_si_send_proxy(struct connection *conn, unsigned int flag)
 {
-       /* we might have been called just after an asynchronous shutw */
-       if (conn->flags & CO_FL_SOCK_WR_SH)
-               goto out_error;
-
        if (!conn_ctrl_ready(conn))
                goto out_error;