From 77b1671662f1ae19c7f49bdbb64ebf570fbb1bec Mon Sep 17 00:00:00 2001 From: Max Kellermann Date: Sat, 6 Sep 2008 15:31:55 +0200 Subject: client: removed assert(client->fd)>=0 Since client->fd==-1 has become our "expired" flag, it may already be -1 when client_close() is called. Don't assert that it is still non-negative, and call client_set_expired() instead. --- src/client.c | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) (limited to 'src') diff --git a/src/client.c b/src/client.c index f09427622..2acc15567 100644 --- a/src/client.c +++ b/src/client.c @@ -230,15 +230,13 @@ static void client_close(struct client *client) { struct sllnode *buf; - assert(client->fd >= 0); - - xclose(client->fd); - assert(num_clients > 0); assert(!list_empty(&clients)); list_del(&client->siblings); --num_clients; + client_set_expired(client); + if (client->cmd_list) { free_cmd_list(client->cmd_list); client->cmd_list = NULL; -- cgit v1.2.3