From f7b1126cec5f977e5552a722ca5385f95df3efd9 Mon Sep 17 00:00:00 2001 From: Timo Sirainen Date: Wed, 20 Aug 2014 15:35:43 +0200 Subject: [PATCH] pop3: Fixed potential assert-crash on disconnect. --- src/pop3/pop3-client.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/pop3/pop3-client.c b/src/pop3/pop3-client.c index a59dc68d69..0da577bc2b 100644 --- a/src/pop3/pop3-client.c +++ b/src/pop3/pop3-client.c @@ -811,7 +811,8 @@ static int client_output(struct client *client) if (client->cmd == NULL) { if (o_stream_get_buffer_used_size(client->output) < - POP3_OUTBUF_THROTTLE_SIZE/2 && client->io == NULL) { + POP3_OUTBUF_THROTTLE_SIZE/2 && client->io == NULL && + !client->input->closed) { /* enable input again */ client->io = io_add_istream(client->input, client_input, client); -- 2.47.3