Skip to content

Commit

Permalink
imapc: Don't send NOOP on sync if MAILBOX_SYNC_FLAG_FAST is set
Browse files Browse the repository at this point in the history
Fast syncing should do only the minimal amount of work.
  • Loading branch information
sirainen committed Apr 27, 2017
1 parent 10b70dc commit 16672e9
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions src/lib-storage/index/imapc/imapc-sync.c
Expand Up @@ -547,8 +547,9 @@ imapc_noop_if_needed(struct imapc_mailbox *mbox, enum mailbox_sync_flags flags)
if (!mbox->initial_sync_done) {
/* we just SELECTed/EXAMINEd the mailbox, don't do another
NOOP. */
} else if ((mbox->capabilities & IMAPC_CAPABILITY_IDLE) == 0 ||
(flags & MAILBOX_SYNC_FLAG_FULL_READ) != 0) {
} else if ((flags & MAILBOX_SYNC_FLAG_FAST) == 0 &&
((mbox->capabilities & IMAPC_CAPABILITY_IDLE) == 0 ||
(flags & MAILBOX_SYNC_FLAG_FULL_READ) != 0)) {
/* do NOOP to make sure we have the latest changes before
starting sync. this is necessary either because se don't
support IDLE at all, or because we want to be sure that we
Expand Down

0 comments on commit 16672e9

Please sign in to comment.