I moved error handling to the imap worker. The patch works but still has the issues
stated previously by Drew and Reto:
https://lists.sr.ht/~sircmpwn/aerc/patches/9455
Unfortunately, this is all the time I have right now...If someone wants to
finish, go ahead.
---
worker/imap/worker.go | 3 +++
1 file changed, 3 insertions(+)
diff --git a/worker/imap/worker.go b/worker/imap/worker.go
index 4d3e51c..7040ba7 100644
--- a/worker/imap/worker.go+++ b/worker/imap/worker.go
@@ -62,6 +62,9 @@ func (w *IMAPWorker) handleMessage(msg types.WorkerMessage) error {
if w.idleStop != nil {
close(w.idleStop)
if err := <-w.idleDone; err != nil {
+ if (err.Error() == "imap: connection closed") {+ w.worker.PostAction(&types.Connect{}, nil)+ } w.worker.PostMessage(&types.Error{Error: err}, nil)
}
}
--
2.24.1