]> git.ipfire.org Git - thirdparty/dovecot/core.git/commitdiff
doveadm-server: Fix hang when sending a lot of output to clients
authorTimo Sirainen <timo.sirainen@dovecot.fi>
Tue, 5 Jun 2018 17:23:52 +0000 (20:23 +0300)
committerVille Savolainen <ville.savolainen@dovecot.fi>
Fri, 8 Jun 2018 07:19:00 +0000 (10:19 +0300)
Nowadays ostream adds its io to the stream's specified ioloop, not to
current ioloop.

src/doveadm/client-connection-tcp.c

index 25b59a7af9906ee6a346ff053de660e02eaa5344..cd1c74476dc9d8e6fcb18f177962fdfdbf39f6a0 100644 (file)
@@ -334,6 +334,9 @@ static int doveadm_cmd_handle(struct client_connection_tcp *conn,
           running one and we can't call the original one recursively, so
           create a new ioloop. */
        conn->ioloop = io_loop_create();
+       o_stream_switch_ioloop(conn->output);
+       if (conn->log_out != NULL)
+               o_stream_switch_ioloop(conn->log_out);
 
        if (cmd_ver2 != NULL)
                doveadm_cmd_server_run_ver2(conn, argc, argv, cctx);