Mercurial > dovecot > core-2.2
changeset 22837:08535865104c
doveadm: client: Set IO only after enabling SSL
io_add_istream() needs to be used with the SSL istream, otherwise it can
cause hangs.
author | Timo Sirainen <timo.sirainen@dovecot.fi> |
---|---|
date | Thu, 08 Feb 2018 02:38:23 +0200 |
parents | 78673e865a93 |
children | bed6a1eb53f7 |
files | src/doveadm/server-connection.c |
diffstat | 1 files changed, 1 insertions(+), 1 deletions(-) [+] |
line wrap: on
line diff
--- a/src/doveadm/server-connection.c Thu Feb 08 02:28:54 2018 +0200 +++ b/src/doveadm/server-connection.c Thu Feb 08 02:38:23 2018 +0200 @@ -537,7 +537,6 @@ conn->fd = doveadm_connect_with_default_port(server->name, doveadm_settings->doveadm_port); net_set_nonblock(conn->fd, TRUE); - conn->io = io_add(conn->fd, IO_READ, server_connection_input, conn); conn->input = i_stream_create_fd(conn->fd, MAX_INBUF_SIZE, FALSE); conn->output = o_stream_create_fd(conn->fd, (size_t)-1, FALSE); o_stream_set_flush_callback(conn->output, server_connection_output, conn); @@ -552,6 +551,7 @@ server_connection_destroy(&conn); return -1; } + conn->io = io_add_istream(conn->input, server_connection_input, conn); o_stream_set_no_error_handling(conn->output, TRUE); conn->state = SERVER_REPLY_STATE_DONE;