changeset 22049:c24c32983eae

imapc: Avoid resending duplicate FETCH when reconnecting during the initial sync
author Timo Sirainen <timo.sirainen@dovecot.fi>
date Thu, 18 May 2017 18:09:56 +0300
parents 6946011b3b0a
children 37e6375d1978
files src/lib-storage/index/imapc/imapc-sync.c
diffstat 1 files changed, 6 insertions(+), 0 deletions(-) [+]
line wrap: on
line diff
--- a/src/lib-storage/index/imapc/imapc-sync.c	Thu May 18 18:01:27 2017 +0300
+++ b/src/lib-storage/index/imapc/imapc-sync.c	Thu May 18 18:09:56 2017 +0300
@@ -512,6 +512,12 @@
 
 	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;