aboutsummaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorMax Kellermann <max@duempel.org>2008-09-06 15:31:55 +0200
committerMax Kellermann <max@duempel.org>2008-09-06 15:31:55 +0200
commit77b1671662f1ae19c7f49bdbb64ebf570fbb1bec (patch)
tree16eb471870269572c3d202798f7c71a81ce018ac /src
parent35c0b84f0897508b1f2fb82d1fc096164621b2bb (diff)
downloadmpd-77b1671662f1ae19c7f49bdbb64ebf570fbb1bec.tar.gz
mpd-77b1671662f1ae19c7f49bdbb64ebf570fbb1bec.tar.xz
mpd-77b1671662f1ae19c7f49bdbb64ebf570fbb1bec.zip
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.
Diffstat (limited to 'src')
-rw-r--r--src/client.c6
1 files changed, 2 insertions, 4 deletions
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;