At least followed by COPY command it assert-crashes.
Fixes:
Panic: file cmd-copy.c: line 120 (fetch_and_copy): assertion failed: (o_stream_is_corked(client->output) || client->output->stream_errno != 0)
(void)imap_sync_deinit(ctx->sync_ctx, ctx->cmd);
}
+ bool orig_corked = o_stream_is_corked(client->output);
o_stream_cork(client->output);
io_remove(&client->io);
else
client_send_tagline(ctx->cmd, "BAD Expected DONE.");
- o_stream_uncork(client->output);
+ if (!orig_corked)
+ o_stream_uncork(client->output);
if (free_cmd)
client_command_free(&ctx->cmd);
}