From: Timo Sirainen Date: Tue, 23 Nov 2010 15:28:47 +0000 (+0000) Subject: doveadm-server: Don't disconnect client after each command. X-Git-Tag: 2.0.8~56 X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=da63ca2e5853dad6413e89dfdecbf0587d05ee8a;p=thirdparty%2Fdovecot%2Fcore.git doveadm-server: Don't disconnect client after each command. --- 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;