diff options
author | Max Kellermann <max@duempel.org> | 2008-09-06 15:31:55 +0200 |
---|---|---|
committer | Eric Wong <normalperson@yhbt.net> | 2008-09-09 01:43:20 -0700 |
commit | e82e9cd8b2bebbaf096bf3a091d3ea0e9613797b (patch) | |
tree | 140d1fd7c9663777267627bac617e46cec2d1c27 /src | |
parent | 1c3e345d833edb4ce0d7a398212e24c32becba04 (diff) | |
download | mpd-e82e9cd8b2bebbaf096bf3a091d3ea0e9613797b.tar.gz mpd-e82e9cd8b2bebbaf096bf3a091d3ea0e9613797b.tar.xz mpd-e82e9cd8b2bebbaf096bf3a091d3ea0e9613797b.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.c | 6 |
1 files changed, 2 insertions, 4 deletions
diff --git a/src/client.c b/src/client.c index 6a43b9586..6bda52bd5 100644 --- a/src/client.c +++ b/src/client.c @@ -234,15 +234,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; |