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.
This commit is contained in:
Max Kellermann 2008-09-06 15:31:55 +02:00
parent 35c0b84f08
commit 77b1671662

View File

@ -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;