]> git.ipfire.org Git - thirdparty/dovecot/core.git/commitdiff
imapc: Avoid resending duplicate FETCH when reconnecting during the initial sync
authorTimo Sirainen <timo.sirainen@dovecot.fi>
Thu, 18 May 2017 15:09:56 +0000 (18:09 +0300)
committerTimo Sirainen <timo.sirainen@dovecot.fi>
Fri, 19 May 2017 10:56:25 +0000 (13:56 +0300)
src/lib-storage/index/imapc/imapc-sync.c

index be29a77281ef0a296639c295c3d29329306aab1f..645e80862492aed90312cc5ac3197e5bab346ba4 100644 (file)
@@ -512,6 +512,12 @@ void imapc_sync_mailbox_reopened(struct imapc_mailbox *mbox)
 
        i_assert(mbox->syncing);
 
+       if (!mbox->initial_sync_done) {
+               /* the same sync commands are automatically already retried by
+                  lib-imap-client. don't duplicate them here. */
+               return;
+       }
+
        /* we got disconnected while syncing. need to
           re-fetch everything */
        mbox->sync_next_lseq = 1;