From ddca71bcfd41d6eb2449dc6ec038dbada1985c32 Mon Sep 17 00:00:00 2001 From: Moritz Poldrack Date: Tue, 20 Sep 2022 00:36:31 +0200 Subject: 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 Acked-by: Robin Jarry --- worker/types/worker.go | 5 +---- 1 file changed, 1 insertion(+), 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 -- cgit