]> git.ipfire.org Git - thirdparty/haproxy.git/commitdiff
MINOR: connection: remove checks for CO_FL_HANDSHAKE before I/O
authorWilly Tarreau <w@1wt.eu>
Thu, 23 Jan 2020 16:30:42 +0000 (17:30 +0100)
committerWilly Tarreau <w@1wt.eu>
Thu, 23 Jan 2020 16:30:42 +0000 (17:30 +0100)
There are still leftovers from the pre-xprt_handshake era with lots
of places where I/O callbacks refrain from receiving/sending if they
see that a handshake is present. This needlessly duplicates the
subscribe calls as it will automatically be done by the underlying
xprt_handshake code when attempting the operation.

The only reason for still checking CO_FL_HANDSHAKE is when we decide
to instantiate xprt_handshake. This patch removes all other ones.

src/checks.c
src/mux_pt.c

index 233d754e1177a9b7bd890fb22818414e3cd964a2..f30f1ae837b1ba344f96412713209e9a358e3a46 100644 (file)
@@ -760,12 +760,6 @@ static void __event_srv_chk_w(struct conn_stream *cs)
        if (unlikely(check->result == CHK_RES_FAILED))
                goto out_wakeup;
 
-       if (conn->flags & CO_FL_HANDSHAKE) {
-               if (!(conn->flags & CO_FL_ERROR))
-                       cs->conn->mux->subscribe(cs, SUB_RETRY_SEND, &check->wait_list);
-               goto out;
-       }
-
        if (retrieve_errno_from_socket(conn)) {
                chk_report_conn_err(check, errno, 0);
                goto out_wakeup;
@@ -849,12 +843,6 @@ static void __event_srv_chk_r(struct conn_stream *cs)
        if (unlikely(check->result == CHK_RES_FAILED))
                goto out_wakeup;
 
-       if (conn->flags & CO_FL_HANDSHAKE) {
-               if (!(conn->flags & CO_FL_ERROR))
-                       cs->conn->mux->subscribe(cs, SUB_RETRY_RECV, &check->wait_list);
-               goto out;
-       }
-
        /* wake() will take care of calling tcpcheck_main() */
        if (check->type == PR_O2_TCPCHK_CHK)
                goto out;
index 4418a65f4042c9f32122a6d0e55f4cb21265625b..c44d612ef09878624e7c1abc130fd6547ff12443 100644 (file)
@@ -295,8 +295,6 @@ static size_t mux_pt_snd_buf(struct conn_stream *cs, struct buffer *buf, size_t
 {
        size_t ret;
 
-       if (cs->conn->flags & CO_FL_HANDSHAKE)
-               return 0;
        ret = cs->conn->xprt->snd_buf(cs->conn, cs->conn->xprt_ctx, buf, count, flags);
 
        if (ret > 0)