changeset 19668:f1aee594704f

imapc: Handle disconnection when NOOP is sent to verify if mail is expunged.
author Timo Sirainen <timo.sirainen@dovecot.fi>
date Thu, 28 Jan 2016 19:49:56 +0200
parents 36e7280c42a5
children 2e624fd124c7
files src/lib-storage/index/imapc/imapc-mail.c
diffstat 1 files changed, 4 insertions(+), 0 deletions(-) [+]
line wrap: on
line diff
--- a/src/lib-storage/index/imapc/imapc-mail.c	Thu Jan 28 19:48:09 2016 +0200
+++ b/src/lib-storage/index/imapc/imapc-mail.c	Thu Jan 28 19:49:56 2016 +0200
@@ -55,6 +55,10 @@
 	/* we may be running against a server that hasn't bothered sending
 	   us an EXPUNGE. see if NOOP sends it. */
 	imapc_mailbox_noop(mbox);
+	if (!mbox->initial_sync_done) {
+		/* NOOP caused a reconnection and desync */
+		return FALSE;
+	}
 
 	return !imapc_msgmap_uid_to_rseq(msgmap, _mail->uid, &rseq);
 }