From d6696f34b83044d4b9e7e714e75b8ff02d54cbc0 Mon Sep 17 00:00:00 2001 From: Jeffas Date: Wed, 26 Feb 2020 20:02:58 +0000 Subject: Make search more lenient When we fail to read a single message we don't need to fail the whole search, just log the error and we can still get results back. --- worker/maildir/search.go | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'worker') diff --git a/worker/maildir/search.go b/worker/maildir/search.go index 47eab6a..f658c02 100644 --- a/worker/maildir/search.go +++ b/worker/maildir/search.go @@ -80,7 +80,8 @@ func (w *Worker) search(criteria *searchCriteria) ([]uint32, error) { for _, key := range keys { success, err := w.searchKey(key, criteria, requiredParts) if err != nil { - return nil, err + // don't return early so that we can still get some results + w.worker.Logger.Printf("Failed to search key %v: %v", key, err) } else if success { matchedUids = append(matchedUids, key) } -- cgit 1.4.1-2-gfad0 itch'/> Soul of a tiny new machine. More thorough tests → More comprehensible and rewrite-friendly software → More resilient society.Kartik K. Agaram <vc@akkartik.com>
about summary refs log tree commit diff stats
path: root/screen.mu
blob: 1c7a31a1e9b2b0a859938483423d0d57fcee894f (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29