From: Timo Sirainen Date: Tue, 26 Jul 2016 17:54:37 +0000 (-0400) Subject: imap: Fixed assert-crash when detecting if client IO is hanging. X-Git-Tag: 2.3.0.rc1~3286 X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=e03bbb0f23631fcde5e83479f987a517c9a8b99f;p=thirdparty%2Fdovecot%2Fcore.git imap: Fixed assert-crash when detecting if client IO is hanging. This was broken by 89d88a5bc. --- diff --git a/src/imap/imap-client.c b/src/imap/imap-client.c index 0d47878c77..31355eb5b2 100644 --- a/src/imap/imap-client.c +++ b/src/imap/imap-client.c @@ -1229,8 +1229,14 @@ int client_output(struct client *client) imap_refresh_proctitle(); if (client->output->closed) client_destroy(client, NULL); - else + else { + /* corking is added automatically by ostream-file. we need to + uncork here before client_check_command_hangs() is called, + because otherwise it can assert-crash due to ioloop not + having IO_WRITE callback set for the ostream. */ + o_stream_uncork(client->output); client_continue_pending_input(client); + } return ret; }