Skip to content

Commit

Permalink
imap: Fix assert-crash when client is disconnected during a long COPY…
Browse files Browse the repository at this point in the history
…/MOVE

Similar fix than 481992b

Fixes:
Panic: file cmd-copy.c: line 50 (fetch_and_copy): assertion failed: (o_stream_is_corked(client->output))
  • Loading branch information
sirainen committed May 30, 2018
1 parent 56d47c7 commit 5718300
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion src/imap/cmd-copy.c
Expand Up @@ -47,7 +47,8 @@ static int fetch_and_copy(struct client_command_context *cmd, bool move,
string_t *src_uidset;
int ret;

i_assert(o_stream_is_corked(client->output));
i_assert(o_stream_is_corked(client->output) ||
client->output->stream_errno != 0);

src_uidset = t_str_new(256);
msgset_generator_init(&srcset_ctx, src_uidset);
Expand Down

0 comments on commit 5718300

Please sign in to comment.