From: Timo Sirainen Date: Wed, 13 Dec 2017 12:19:41 +0000 (+0200) Subject: imap: Fix o_stream_is_corked() assert check X-Git-Tag: 2.3.0.rc1~64 X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=481992bfe2740bdec70fcd7366dea50ed9128966;p=thirdparty%2Fdovecot%2Fcore.git imap: Fix o_stream_is_corked() assert check 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)) --- diff --git a/src/imap/imap-client.c b/src/imap/imap-client.c index 9b830466a7..4ceea7979b 100644 --- a/src/imap/imap-client.c +++ b/src/imap/imap-client.c @@ -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;