From 6a0a80adaf8649bda5caa6315cd1fd03a646beae Mon Sep 17 00:00:00 2001 From: Willy Tarreau Date: Thu, 5 Oct 2017 17:43:39 +0200 Subject: [PATCH] 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. --- include/proto/connection.h | 1 + 1 file changed, 1 insertion(+) diff --git a/include/proto/connection.h b/include/proto/connection.h index defdefe96..dd19714d0 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; } }