]> git.ipfire.org Git - thirdparty/haproxy.git/commitdiff
CLEANUP: connection: remove the unneeded fd_stop_{recv,send} on read0/shutw
authorWilly Tarreau <w@1wt.eu>
Fri, 11 Dec 2020 12:56:12 +0000 (13:56 +0100)
committerWilly Tarreau <w@1wt.eu>
Fri, 11 Dec 2020 12:56:12 +0000 (13:56 +0100)
These are two other areas where this fd_stop_recv()/fd_stop_send() makes no
sense anymore. Both happen by definition while the FD is *not* subscribed,
since nowadays it's subscribed after failing recv()/send(), in which case
we cannot close.

include/haproxy/connection.h

index 7c279afac606e86f6e3f77691ba5c8b6e67ad31e..13c93a4b83dc645bf73e2ecd608fa88011df1c70 100644 (file)
@@ -177,7 +177,6 @@ static inline void conn_sock_read0(struct connection *c)
 {
        c->flags |= CO_FL_SOCK_RD_SH;
        if (conn_ctrl_ready(c)) {
-               fd_stop_recv(c->handle.fd);
                /* we don't risk keeping ports unusable if we found the
                 * zero from the other side.
                 */
@@ -194,7 +193,6 @@ static inline void conn_sock_shutw(struct connection *c, int clean)
 {
        c->flags |= CO_FL_SOCK_WR_SH;
        if (conn_ctrl_ready(c)) {
-               fd_stop_send(c->handle.fd);
                /* don't perform a clean shutdown if we're going to reset or
                 * if the shutr was already received.
                 */