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.2.rc1~44 X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=9db5a1d0142ca8d590e887a87a200a5929783384;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 25b59a7af9..cd1c74476d 100644 --- a/src/doveadm/client-connection-tcp.c +++ b/src/doveadm/client-connection-tcp.c @@ -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);