From d1b3f0498d866d6dad38a3ba23dc40b1f74a192b Mon Sep 17 00:00:00 2001 From: Willy Tarreau Date: Fri, 30 Nov 2012 15:15:28 +0100 Subject: [PATCH] MINOR: connection: don't remove failed handshake flags 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 | 2 -- src/ssl_sock.c | 1 - src/stream_interface.c | 1 - 3 files changed, 4 deletions(-) diff --git a/src/connection.c b/src/connection.c index d882bb74d..a527bd774 100644 --- a/src/connection.c +++ b/src/connection.c @@ -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: diff --git a/src/ssl_sock.c b/src/ssl_sock.c index 2892f8ffd..be324c0ee 100644 --- a/src/ssl_sock.c +++ b/src/ssl_sock.c @@ -980,7 +980,6 @@ reneg_ok: /* Fail on all other handshake errors */ conn->flags |= CO_FL_ERROR; - conn->flags &= ~flag; return 0; } diff --git a/src/stream_interface.c b/src/stream_interface.c index e70f0f54d..dc1485883 100644 --- a/src/stream_interface.c +++ b/src/stream_interface.c @@ -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: