]> git.ipfire.org Git - thirdparty/haproxy.git/commitdiff
MINOR: session: small cleanup of conn_complete_session()
authorWilly Tarreau <w@1wt.eu>
Fri, 15 Sep 2017 07:49:59 +0000 (09:49 +0200)
committerWilly Tarreau <w@1wt.eu>
Fri, 15 Sep 2017 09:49:52 +0000 (11:49 +0200)
Commit 8e3c6ce ("MEDIUM: connection: get rid of data->init() which was
not for data") simplified conn_complete_session() but introduced a
confusing check which cannot happen on CO_FL_HANDSHAKE. Make it clear
that this call is final and will either succeed and complete the
session or fail.

src/session.c

index 22f6b58b4bd0167dcfa558138060f8f30ca2c512..c4c929450baeaedb84345c8e3b336af5f5b47c0c 100644 (file)
@@ -404,14 +404,12 @@ static int conn_complete_session(struct connection *conn)
 {
        struct session *sess = conn->owner;
 
+       /* the embryonic session's task is not needed anymore */
        conn_clear_xprt_done_cb(conn);
 
        if (conn->flags & CO_FL_ERROR)
                goto fail;
 
-       if (conn->flags & CO_FL_HANDSHAKE)
-               return 0; /* wait more */
-
        /* if logs require transport layer information, note it on the connection */
        if (sess->fe->to_log & LW_XPRT)
                conn->flags |= CO_FL_XPRT_TRACKED;