From 7465bd34863419a82aec82cb13129945e258854d Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Lo=C3=AFc=20Gomez?= Date: Tue, 30 Jan 2024 22:30:27 +0900 Subject: [PATCH] Fix file descriptor leak on erroring client disconnects --- src/connection.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/connection.c b/src/connection.c index 0a138eb..0c0eb99 100644 --- a/src/connection.c +++ b/src/connection.c @@ -62,7 +62,7 @@ void connection_close(connection_t *cn) { mylog(LOG_DEBUG, "Connection close asked. FD:%d (status: %d)", (long)cn->handle, cn->connected); - if (cn->connected != CONN_DISCONN && cn->connected != CONN_ERROR) { + if (cn->connected != CONN_DISCONN) { cn->connected = CONN_DISCONN; if (close(cn->handle) == -1) mylog(LOG_WARN, "Error on socket close: %s",