]> git.ipfire.org Git - thirdparty/dovecot/core.git/commitdiff
pop3c: If prefetch fails, treat it as if prefetching simply wasn't done.
authorTimo Sirainen <timo.sirainen@dovecot.fi>
Mon, 1 Feb 2016 17:07:59 +0000 (19:07 +0200)
committerTimo Sirainen <timo.sirainen@dovecot.fi>
Mon, 1 Feb 2016 17:07:59 +0000 (19:07 +0200)
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.

src/lib-storage/index/pop3c/pop3c-mail.c

index 8fc7f0ae631aacb608d8092cad99590f97681626..f1ac6ce834624394f3465529bdfec486bf027b64 100644 (file)
@@ -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;