Revert "worker: prevent deadlock by flooding worker.Messages channel"

This reverts commit 7473571159.

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>
This commit is contained in:
Moritz Poldrack 2022-09-20 00:36:31 +02:00 committed by Robin Jarry
parent f59ca5af36
commit ddca71bcfd
1 changed files with 1 additions and 4 deletions

View File

@ -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