]> git.ipfire.org Git - thirdparty/haproxy.git/commitdiff
BUG/MEDIUM: stream_interface: Don't check if the handshake is done.
authorOlivier Houchard <ohouchard@haproxy.com>
Thu, 29 Nov 2018 16:00:38 +0000 (17:00 +0100)
committerWilly Tarreau <w@1wt.eu>
Thu, 29 Nov 2018 16:39:04 +0000 (17:39 +0100)
In si_cs_send(), don't give up and subscribe if the connection is still
waiting for a SSL handshake. We will never be woken up once the handshake is
done if we're using HTTP/2. Instead, directly try to send data. When using
the mux_pt, if the handshake is not done yet, snd_buf() would return 0 and
we will subscribe anyway.

src/stream_interface.c

index 78c0c6ad47c466835f60f8d61ca62783f50ec1d8..93ef344ec8be5c1b7b024b031269d734d9d516c6 100644 (file)
@@ -601,13 +601,6 @@ int si_cs_send(struct conn_stream *cs)
        if (conn->flags & CO_FL_ERROR || cs->flags & CS_FL_ERROR)
                return 1;
 
-       if (conn->flags & CO_FL_HANDSHAKE) {
-               /* a handshake was requested */
-               /* Schedule ourself to be woken up once the handshake is done */
-               conn->xprt->subscribe(conn, SUB_CAN_SEND,  &si->wait_event);
-               return 0;
-       }
-
        /* we might have been called just after an asynchronous shutw */
        if (conn->flags & CO_FL_SOCK_WR_SH || oc->flags & CF_SHUTW)
                return 1;