]> git.ipfire.org Git - thirdparty/dovecot/core.git/commitdiff
imap: Fixed assert-crash when detecting if client IO is hanging.
authorTimo Sirainen <timo.sirainen@dovecot.fi>
Tue, 26 Jul 2016 17:54:37 +0000 (13:54 -0400)
committerTimo Sirainen <timo.sirainen@dovecot.fi>
Tue, 26 Jul 2016 17:54:37 +0000 (13:54 -0400)
This was broken by 89d88a5bc.

src/imap/imap-client.c

index 0d47878c7727c0b2c9f7d86c287caa460ccfb27b..31355eb5b296d53fb51d5e3a227a4eaf56d94259 100644 (file)
@@ -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;
 }