From: Timo Sirainen Date: Mon, 8 May 2023 08:08:51 +0000 (+0300) Subject: imap: NOTIFY delayed notifications sent soon after handling IMAP commands X-Git-Tag: 2.4.0~2771 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=816dffb24279e1bce922a6c3f08dbf185728d9ed;p=thirdparty%2Fdovecot%2Fcore.git imap: NOTIFY delayed notifications sent soon after handling IMAP commands If a change happened within 1 second after any IMAP command was finished, the notification wasn't sent until some other change/command occurred. --- diff --git a/src/imap/imap-notify.c b/src/imap/imap-notify.c index 4c0d0dd0db..83b2fd2363 100644 --- a/src/imap/imap-notify.c +++ b/src/imap/imap-notify.c @@ -424,6 +424,9 @@ static void imap_notify_watch_selected_mailbox(struct client *client) } mailbox_notify_changes(client->mailbox, imap_notify_callback, client); client->notify_ctx->watching_mailbox = TRUE; + /* There may have been changes before the mailbox notification watch + was added. Check that now. */ + imap_notify_callback(client->mailbox, client); } static void imap_notify_watch_timeout(struct client *client)