]> git.ipfire.org Git - thirdparty/dovecot/core.git/commitdiff
imap: NOTIFY delayed notifications sent soon after handling IMAP commands
authorTimo Sirainen <timo.sirainen@open-xchange.com>
Mon, 8 May 2023 08:08:51 +0000 (11:08 +0300)
committerTimo Sirainen <timo.sirainen@open-xchange.com>
Mon, 8 May 2023 08:14:04 +0000 (11:14 +0300)
If a change happened within 1 second after any IMAP command was finished,
the notification wasn't sent until some other change/command occurred.

src/imap/imap-notify.c

index 4c0d0dd0db5cde597cbc6d9f3f9756a86a62b341..83b2fd23638179f0f5dc851a61e4ce63c04fd5d4 100644 (file)
@@ -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)