aboutsummaryrefslogtreecommitdiffstats
path: root/worker/imap/idler.go
Commit message (Collapse)AuthorAgeFilesLines
* imap: add debouncer to the idlerKoni Marti2022-05-041-11/+23
| | | | | | | | | | | | | Add a debouncer to the idle mode. Avoid unnecessary idling when another job arrives within a certain time frame. For example, the ui sends three messages to the worker at the same time when we open a message (FlagMessage, FetchMessageBodyPart, and the FetchMessageHeaders). The debouncer prevents the unnecessary entering and leaving of the idle mode between those messages. Signed-off-by: Koni Marti <koni.marti@gmail.com> Acked-by: Robin Jarry <robin@jarry.cc>
* imap: manage idle mode with an idlerKoni Marti2022-05-041-0/+149
Untangle the idle functionality from the message handling routine. Wait for the idle mode to properly exit every time to ensure a consistent imap state. Timeout when hanging in idle mode and inform the ui. Signed-off-by: Koni Marti <koni.marti@gmail.com> Acked-by: Robin Jarry <robin@jarry.cc>