From: Willy Tarreau Date: Fri, 30 Nov 2012 14:15:28 +0000 (+0100) Subject: MINOR: connection: don't remove failed handshake flags X-Git-Tag: v1.5-dev15~36 X-Git-Url: http://git.kaiwu.me/postgresql/log/contrib/postgres_fdw/postgres_fdw.c?a=commitdiff_plain;h=d1b3f0498d866d6dad38a3ba23dc40b1f74a192b;p=haproxy.git 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. --- 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: