Fix file descriptor leak on erroring client disconnects #14

Manually merged
bip merged 1 commits from Kyoshiro/bip:431_fix_fd_leak into master 2024-03-20 14:18:52 +01:00
1 changed files with 1 additions and 1 deletions

View File

@ -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",