aboutsummaryrefslogtreecommitdiffstats
path: root/worker/maildir/search.go
diff options
context:
space:
mode:
authorRobin Jarry <robin@jarry.cc>2023-01-06 22:49:26 +0100
committerRobin Jarry <robin@jarry.cc>2023-01-06 23:51:58 +0100
commit915b869e3fc6377be114c033763987de612c443c (patch)
tree95a2165a06cbda9ad0d092ac1b3816f50daa52c1 /worker/maildir/search.go
parent175c1c822084d0f42892729c8e095397bd830966 (diff)
downloadaerc-915b869e3fc6377be114c033763987de612c443c.tar.gz
lint: add missing panic handlers in goroutines
These issues were all reported by the new custom analyzer introduced in previous commit. Signed-off-by: Robin Jarry <robin@jarry.cc> Tested-by: Bence Ferdinandy <bence@ferdinandy.com>
Diffstat (limited to 'worker/maildir/search.go')
-rw-r--r--worker/maildir/search.go1
1 files changed, 1 insertions, 0 deletions
diff --git a/worker/maildir/search.go b/worker/maildir/search.go
index e70282e2..c667d48f 100644
--- a/worker/maildir/search.go
+++ b/worker/maildir/search.go
@@ -120,6 +120,7 @@ func (w *Worker) search(criteria *searchCriteria) ([]uint32, error) {
limit <- struct{}{}
wg.Add(1)
go func(key uint32) {
+ defer log.PanicHandler()
defer wg.Done()
success, err := w.searchKey(key, criteria, requiredParts)
if err != nil {