Commit 77b16716 authored by Max Kellermann's avatar Max Kellermann

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.
parent 35c0b84f
......@@ -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;
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment