]> git.ipfire.org Git - thirdparty/dovecot/core.git/commitdiff
imap: Fix o_stream_is_corked() assert check
authorTimo Sirainen <timo.sirainen@dovecot.fi>
Wed, 13 Dec 2017 12:19:41 +0000 (14:19 +0200)
committerAki Tuomi <aki.tuomi@open-xchange.com>
Wed, 13 Dec 2017 14:37:40 +0000 (16:37 +0200)
All the callers cork the stream, so this can only mean that the corking
failed because the connection was already closed. Continue handling the
input anyway.

Fixes:
Panic: file imap-client.c: line 1236 (client_handle_input): assertion failed: (o_stream_is_corked(client->output))

src/imap/imap-client.c

index 9b830466a7701bb16fa362fb9c7a094a2cb4d743..4ceea7979bb93ba938b250f2b1774464086d6a81 100644 (file)
@@ -1233,7 +1233,8 @@ bool client_handle_input(struct client *client)
 {
        bool ret, remove_io, handled_commands = FALSE;
 
-       i_assert(o_stream_is_corked(client->output));
+       i_assert(o_stream_is_corked(client->output) ||
+                client->output->stream_errno != 0);
        i_assert(!client->disconnected);
 
        client->handling_input = TRUE;