diff options
author | Moritz Poldrack <git@moritz.sh> | 2022-09-20 00:36:31 +0200 |
---|---|---|
committer | Robin Jarry <robin@jarry.cc> | 2022-09-20 00:37:42 +0200 |
commit | ddca71bcfd41d6eb2449dc6ec038dbada1985c32 (patch) | |
tree | 222a39abb3b9b1f31a4f1181eed23b0a971f98eb | |
parent | f59ca5af361c2d9accd721c316e5b0b5be4879d7 (diff) | |
download | aerc-ddca71bcfd41d6eb2449dc6ec038dbada1985c32.tar.gz |
Revert "worker: prevent deadlock by flooding worker.Messages channel"
This reverts commit 74735711595c3f0dc29177f767b2c91beef19617.
The commit has introduced a regression that lead to the pager not being
filled with content, thereby making reading mails impossible.
Signed-off-by: Moritz Poldrack <git@moritz.sh>
Acked-by: Robin Jarry <robin@jarry.cc>
-rw-r--r-- | worker/types/worker.go | 5 |
1 files changed, 1 insertions, 4 deletions
diff --git a/worker/types/worker.go b/worker/types/worker.go index 5a964f2f..ba396aa3 100644 --- a/worker/types/worker.go +++ b/worker/types/worker.go @@ -64,10 +64,7 @@ func (worker *Worker) PostMessage(msg WorkerMessage, } else { logging.Debugf("PostMessage %T", msg) } - // This one needs to be in a separate goroutine to prevent deadlocks - go func() { - worker.Messages <- msg - }() + worker.Messages <- msg if cb != nil { worker.messageCallbacks[msg.getId()] = cb |