For example:
- lookup start
- iterate start
- iterate finished, but can't reply yet
- lookup finished
- iterate reply can be sent now, but wasn't previously
struct dict_command_stats cmd_stats;
+static int cmd_iterate_flush(struct dict_connection_cmd *cmd);
+
static void dict_connection_cmd_output_more(struct dict_connection_cmd *cmd);
static void dict_connection_cmd_free(struct dict_connection_cmd *cmd)
first_cmdp = array_idx(&conn->cmds, 0);
cmd = *first_cmdp;
+ /* we may be able to start outputting iterations now. */
+ if (cmd->iter != NULL)
+ (void)cmd_iterate_flush(cmd);
+
if (cmd->reply == NULL) {
/* command not finished yet */
break;