From da63ca2e5853dad6413e89dfdecbf0587d05ee8a Mon Sep 17 00:00:00 2001 From: Timo Sirainen Date: Tue, 23 Nov 2010 15:28:47 +0000 Subject: [PATCH] doveadm-server: Don't disconnect client after each command. --- src/doveadm/client-connection.c | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/src/doveadm/client-connection.c b/src/doveadm/client-connection.c index 129cb09fa8..7938b57019 100644 --- a/src/doveadm/client-connection.c +++ b/src/doveadm/client-connection.c @@ -143,7 +143,8 @@ static bool client_handle_command(struct client_connection *conn, char **args) /* flush the output and disconnect */ net_set_nonblock(conn->fd, FALSE); (void)o_stream_flush(conn->output); - return FALSE; + net_set_nonblock(conn->fd, TRUE); + return TRUE; } static bool @@ -179,7 +180,7 @@ static void client_connection_input(struct client_connection *conn) return; } - while ((line = i_stream_read_next_line(conn->input)) != NULL && ret) { + while (ret && (line = i_stream_read_next_line(conn->input)) != NULL) { T_BEGIN { char **args; -- 2.47.3