From: Timo Sirainen Date: Tue, 5 Jun 2018 17:23:52 +0000 (+0300) Subject: doveadm-server: Fix hang when sending a lot of output to clients X-Git-Tag: 2.3.9~1734 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=a952e178943a5944255cb7c053d970f8e6d49336;p=thirdparty%2Fdovecot%2Fcore.git doveadm-server: Fix hang when sending a lot of output to clients Nowadays ostream adds its io to the stream's specified ioloop, not to current ioloop. --- diff --git a/src/doveadm/client-connection-tcp.c b/src/doveadm/client-connection-tcp.c index a2e1358d7f..672017495d 100644 --- a/src/doveadm/client-connection-tcp.c +++ b/src/doveadm/client-connection-tcp.c @@ -336,6 +336,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);