Mercurial > dovecot > core-2.2
changeset 12667:ceab4f233bff
imapc: When local IDLE is started, force remote server to first check changes with NOOP.
This is makes clicking Thunderbird's "get mail" button to check for new
mails with servers that don't notify about them immediately after they
arrive.
author | Timo Sirainen <tss@iki.fi> |
---|---|
date | Thu, 17 Feb 2011 07:45:30 +0200 |
parents | 0af45e821da1 |
children | 4363f0b68031 |
files | src/lib-storage/index/imapc/imapc-storage.c |
diffstat | 1 files changed, 6 insertions(+), 1 deletions(-) [+] |
line wrap: on
line diff
--- a/src/lib-storage/index/imapc/imapc-storage.c Sat Feb 12 06:06:32 2011 +0200 +++ b/src/lib-storage/index/imapc/imapc-storage.c Thu Feb 17 07:45:30 2011 +0200 @@ -506,7 +506,12 @@ capa = imapc_client_get_capabilities(mbox->storage->client); if ((capa & IMAPC_CAPABILITY_IDLE) != 0) { - /* we're doing IDLE all the time anyway - nothing to do here */ + /* remote server is already in IDLE. but since some servers + don't notice changes immediately, we'll force them to check + here by sending a NOOP. this helps with clients that break + IDLE when clicking "get mail". */ + imapc_client_mailbox_cmd(mbox->client_box, "NOOP", + imapc_async_callback, mbox->storage); } else { /* remote server doesn't support IDLE. check for changes with NOOP every once in a while. */