]> git.ipfire.org Git - thirdparty/haproxy.git/commitdiff
MINOR: connection: don't remove failed handshake flags
authorWilly Tarreau <w@1wt.eu>
Fri, 30 Nov 2012 14:15:28 +0000 (15:15 +0100)
committerWilly Tarreau <w@1wt.eu>
Mon, 3 Dec 2012 13:22:12 +0000 (14:22 +0100)
It's annoying that handshake handlers remove themselves from the
connection flags when they fail because there is no way to tell
which one fails. So now we only remove them when they succeed.

src/connection.c
src/ssl_sock.c
src/stream_interface.c

index d882bb74d3345462fc09298a22878ef3a515503b..a527bd77445acdb465c9f4fe7a8da7746e199c8c 100644 (file)
@@ -428,7 +428,6 @@ int conn_recv_proxy(struct connection *conn, int flag)
  fail:
        conn_sock_stop_both(conn);
        conn->flags |= CO_FL_ERROR;
-       conn->flags &= ~flag;
        return 0;
 }
 
@@ -574,7 +573,6 @@ int conn_local_send_proxy(struct connection *conn, unsigned int flag)
  out_error:
        /* Write error on the file descriptor */
        conn->flags |= CO_FL_ERROR;
-       conn->flags &= ~flag;
        return 0;
 
  out_wait:
index 2892f8ffd7f2745ef3c86db60de2dfd070d79558..be324c0ee8d0d93f6a4a898be0edf15cbec1b62a 100644 (file)
@@ -980,7 +980,6 @@ reneg_ok:
 
        /* Fail on all other handshake errors */
        conn->flags |= CO_FL_ERROR;
-       conn->flags &= ~flag;
        return 0;
 }
 
index e70f0f54dc7bf68e508a3d2fde35fdbbca4944ca..dc148588352e25ac7cf3c0b1e669c2325bff707d 100644 (file)
@@ -485,7 +485,6 @@ int conn_si_send_proxy(struct connection *conn, unsigned int flag)
  out_error:
        /* Write error on the file descriptor */
        conn->flags |= CO_FL_ERROR;
-       conn->flags &= ~flag;
        return 0;
 
  out_wait: