From: Willy Tarreau Date: Thu, 5 Oct 2017 15:43:39 +0000 (+0200) Subject: MINOR: connection: ensure conn_ctrl_close() also resets the fd X-Git-Tag: v1.8-dev3~12 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=6a0a80adaf8649bda5caa6315cd1fd03a646beae;p=thirdparty%2Fhaproxy.git MINOR: connection: ensure conn_ctrl_close() also resets the fd 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. --- diff --git a/include/proto/connection.h b/include/proto/connection.h index defdefe961..dd19714d03 100644 --- a/include/proto/connection.h +++ b/include/proto/connection.h @@ -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; } }