Skip to content
Permalink
Browse files

Merge pull request #13 from armatusmiles/master

Fix fd leaks in clientbase
  • Loading branch information
CozC committed Nov 28, 2019
2 parents 49f8d46 + aafb32f commit 7d2cd9efe7ed428a7180d38e040579e403fe12ca
Showing with 5 additions and 0 deletions.
  1. +5 −0 src/clientbase.c
@@ -419,7 +419,12 @@ void ci_read_cb(ClientBase_T *client)
client->client_state |= CLIENT_ERR;
PUNLOCK(client->lock);
}
} else { // connection was closed from client side
PLOCK(client->lock);
client->client_state |= CLIENT_ERR;
PUNLOCK(client->lock);
}

if (client->sock->ssl || client->rx) { // EOF on stdin is not an error
PLOCK(client->lock);
client->client_state |= CLIENT_EOF;

0 comments on commit 7d2cd9e

Please sign in to comment.
You can’t perform that action at this time.