aboutsummaryrefslogtreecommitdiffstats
path: root/src/client.c
diff options
context:
space:
mode:
authorMax Kellermann <max@duempel.org>2009-06-04 08:59:33 +0200
committerMax Kellermann <max@duempel.org>2009-06-04 08:59:33 +0200
commitfaaf9dafe131ae8cf1dd2d0319e565a3be3cff52 (patch)
tree6cf1426dcc0dca8393ed3dcef19da9dfbf30b215 /src/client.c
parent427dd816780c495097619353ab5c6d423072dcb4 (diff)
downloadmpd-faaf9dafe131ae8cf1dd2d0319e565a3be3cff52.tar.gz
mpd-faaf9dafe131ae8cf1dd2d0319e565a3be3cff52.tar.xz
mpd-faaf9dafe131ae8cf1dd2d0319e565a3be3cff52.zip
client: check "expired" flag again in client_write_output()
When client_defer_output() aborts the connection to the client, client_write_output() called client_write_deferred() anyway. This caused an assertion failure. Fix it by checking for the "expired" flag again after client_defer_output() returns.
Diffstat (limited to '')
-rw-r--r--src/client.c3
1 files changed, 3 insertions, 0 deletions
diff --git a/src/client.c b/src/client.c
index 1133be483..6a256998f 100644
--- a/src/client.c
+++ b/src/client.c
@@ -776,6 +776,9 @@ static void client_write_output(struct client *client)
client_defer_output(client, client->send_buf,
client->send_buf_used);
+ if (client_is_expired(client))
+ return;
+
/* try to flush the deferred buffers now; the current
server command may take too long to finish, and
meanwhile try to feed output to the client,