]> git.ipfire.org Git - thirdparty/haproxy.git/commitdiff
BUG/MEDIUM: stream: Don't install the mux in back_handle_st_con().
authorOlivier Houchard <ohouchard@haproxy.com>
Fri, 24 Jan 2020 14:36:38 +0000 (15:36 +0100)
committerOlivier Houchard <cognet@ci0.org>
Fri, 24 Jan 2020 14:40:34 +0000 (15:40 +0100)
In back_handle_st_con(), don't bother setting up the mux, it is now done by
conn_fd_handler().

src/backend.c

index 1c0cf660b7f5f45b25ece9088ffef22c0d408367..a9d538d79f43e39a94513b3ef7e5cf5d7da7ff3f 100644 (file)
@@ -1905,9 +1905,6 @@ void back_handle_st_req(struct stream *s)
  * SI_ST_CER (error), SI_ST_DIS (abort), and SI_ST_CON (no change). This only
  * works with connection-based streams. We know that there were no I/O event
  * when reaching this function. Timeouts and errors are *not* cleared.
- * We might have been woken up as part of the confirmation of a full-stack
- * connection setup (e.g. raw+PP+TLS+ALPN). It will then be our role to install
- * a mux on this connection based on what ALPN could have been negotiated.
  */
 void back_handle_st_con(struct stream *s)
 {
@@ -1933,25 +1930,6 @@ void back_handle_st_con(struct stream *s)
                goto end;
        }
 
-       /* first, let's see if we've made any progress on this connection */
-       if (!conn->mux && !(conn->flags & CO_FL_WAIT_XPRT)) {
-               /* connection finished to set up */
-               struct server *srv;
-
-               if (conn->flags & CO_FL_ERROR)
-                       goto fail;
-               if (conn_install_mux_be(conn, srv_cs, s->sess) < 0)
-                       goto fail;
-               srv = objt_server(s->target);
-               if (srv && ((s->be->options & PR_O_REUSE_MASK) != PR_O_REUSE_NEVR) &&
-                   conn->mux->avail_streams(conn) > 0)
-                       LIST_ADD(&srv->idle_conns[tid], &conn->list);
-               goto done;
-
-       fail:
-               si_release_endpoint(&s->si[1]);
-       }
-
  done:
        /* retryable error ? */
        if (si->flags & (SI_FL_EXP|SI_FL_ERR)) {