From faaf9dafe131ae8cf1dd2d0319e565a3be3cff52 Mon Sep 17 00:00:00 2001 From: Max Kellermann Date: Thu, 4 Jun 2009 08:59:33 +0200 Subject: 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. --- src/client.c | 3 +++ 1 file changed, 3 insertions(+) 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, -- cgit v1.2.3