aboutsummaryrefslogtreecommitdiffstats
path: root/worker/maildir/worker.go
diff options
context:
space:
mode:
authorTim Culverhouse <tim@timculverhouse.com>2022-09-21 11:44:12 -0500
committerRobin Jarry <robin@jarry.cc>2022-09-25 11:54:27 +0200
commite7a51f55241c46d9eb7eb113c3a27f3709175019 (patch)
tree4b0ac2cf8866f40b834f19f40becb8fef4ae5599 /worker/maildir/worker.go
parenta9af5635bc16bf994489f521006ab5151cddf609 (diff)
downloadaerc-e7a51f55241c46d9eb7eb113c3a27f3709175019.tar.gz
backends: send MessageInfoError on header fetching error
When an error is encountered fetching a header, the backends respond with a type.Error worker message. On receipt of this message, the UI deletes all pending headers. The headers are all requested again as they remain on the screen, resulting in an infinite request loop - and an infinite logging loop. The user only ever sees the spinner unless they check the logs. A previous commit intended to fix this, however it introduced a regression where any message that was part of the fetch request would also be marked as erroneous. This commit is reverted with commit 2aad2fea7d36 ("msgstore: revert 9fdc7acf5b48"). Send an erroneous message info message from the backend when an error is encountered for a specific UID. Fixes: 01f80721e283 ("msgstore: post MessageInfo on erroneous fetch") Signed-off-by: Tim Culverhouse <tim@timculverhouse.com> Acked-by: Robin Jarry <robin@jarry.cc>
Diffstat (limited to 'worker/maildir/worker.go')
-rw-r--r--worker/maildir/worker.go2
1 files changed, 1 insertions, 1 deletions
diff --git a/worker/maildir/worker.go b/worker/maildir/worker.go
index 0ece323b..d0619ad4 100644
--- a/worker/maildir/worker.go
+++ b/worker/maildir/worker.go
@@ -479,7 +479,7 @@ func (w *Worker) handleFetchMessageHeaders(
info, err := w.msgInfoFromUid(uid)
if err != nil {
logging.Errorf("could not get message info: %w", err)
- w.err(msg, err)
+ w.worker.PostMessageInfoError(msg, uid, err)
continue
}
w.worker.PostMessage(&types.MessageInfo{