]> git.ipfire.org Git - thirdparty/haproxy.git/commitdiff
MINOR: connection: ensure conn_ctrl_close() also resets the fd
authorWilly Tarreau <w@1wt.eu>
Thu, 5 Oct 2017 15:43:39 +0000 (17:43 +0200)
committerWilly Tarreau <w@1wt.eu>
Sun, 22 Oct 2017 07:54:16 +0000 (09:54 +0200)
The connection's fd was reset to DEAD_FD_MAGIC on conn_force_close()
but not on conn_full_close(), which is a bit strange. Let's do it on
both.

include/proto/connection.h

index defdefe9618d0472d99915a77bbb4f97bf7fd2a4..dd19714d03c5b7265b135a40856e3314dfde7e42 100644 (file)
@@ -125,6 +125,7 @@ static inline void conn_ctrl_close(struct connection *conn)
 {
        if ((conn->flags & (CO_FL_XPRT_READY|CO_FL_CTRL_READY)) == CO_FL_CTRL_READY) {
                fd_delete(conn->handle.fd);
+               conn->handle.fd = DEAD_FD_MAGIC;
                conn->flags &= ~CO_FL_CTRL_READY;
        }
 }