From: Timo Sirainen Date: Mon, 1 Feb 2016 17:07:59 +0000 (+0200) Subject: pop3c: If prefetch fails, treat it as if prefetching simply wasn't done. X-Git-Tag: 2.2.22.rc1~228 X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=f2686912e0156c04296d6dc306f39d61089a1363;p=thirdparty%2Fdovecot%2Fcore.git pop3c: If prefetch fails, treat it as if prefetching simply wasn't done. This avoids having error handling twice. Also in case the error was caused by -ERR, this should retry the operation, which even might fix it in some situations. --- diff --git a/src/lib-storage/index/pop3c/pop3c-mail.c b/src/lib-storage/index/pop3c/pop3c-mail.c index 8fc7f0ae63..f1ac6ce834 100644 --- a/src/lib-storage/index/pop3c/pop3c-mail.c +++ b/src/lib-storage/index/pop3c/pop3c-mail.c @@ -141,12 +141,9 @@ static void pop3c_mail_prefetch_done(enum pop3c_command_state state, break; case POP3C_COMMAND_STATE_ERR: case POP3C_COMMAND_STATE_DISCONNECTED: - cmd = pmail->prefetching_body ? "RETR" : "TOP"; i_stream_unref(&pmail->prefetch_stream); - pmail->prefetch_stream = - i_stream_create_error_str(EIO, "%s %u failed: %s", - cmd, _mail->seq, reply); - i_stream_set_name(pmail->prefetch_stream, cmd); + /* let pop3c_mail_get_stream() figure out the error handling. + in case of a -ERR a retry might even work. */ break; } pmail->prefetching = FALSE;