#define DEFAULT_IDLE_CHECK_INTERVAL 30
-#include "imap-fetch.h"
static void idle_finish(struct client *client, int done_ok)
{
if (client->idle_to != NULL) {
if (sync) {
ibox->box.sync(&ibox->box, ibox->autosync_flags);
- ibox->autosync_pending = FALSE;
+ ibox->sync_last_notify = ioloop_time;
+ ibox->autosync_pending = FALSE;
}
}
{
struct index_mailbox *ibox = context;
- if ((unsigned int) (ioloop_time - ibox->sync_last_check) >=
+ ibox->sync_last_check = ioloop_time;
+ if ((unsigned int) (ioloop_time - ibox->sync_last_notify) >=
ibox->min_newmail_notify_interval) {
- ibox->sync_last_check = ioloop_time;
ibox->box.sync(&ibox->box, ibox->autosync_flags);
+ ibox->sync_last_notify = ioloop_time;
ibox->autosync_pending = FALSE;
} else {
ibox->autosync_pending = TRUE;
struct index_autosync_file *autosync_files;
struct index_autosync_io *autosync_ios;
enum mailbox_sync_flags autosync_flags;
- time_t sync_last_check;
+ time_t sync_last_check, sync_last_notify;
unsigned int min_newmail_notify_interval;
struct index_mail fetch_mail; /* fetch_uid() or fetch_seq() */