aboutsummaryrefslogtreecommitdiffstats
path: root/lib/msgstore.go
diff options
context:
space:
mode:
Diffstat (limited to 'lib/msgstore.go')
-rw-r--r--lib/msgstore.go3
1 files changed, 2 insertions, 1 deletions
diff --git a/lib/msgstore.go b/lib/msgstore.go
index 77aeb4c1..376e079e 100644
--- a/lib/msgstore.go
+++ b/lib/msgstore.go
@@ -144,7 +144,8 @@ func (store *MessageStore) FetchHeaders(uids []uint32,
Uids: toFetch,
},
func(msg types.WorkerMessage) {
- if _, ok := msg.(*types.Error); ok {
+ switch msg.(type) {
+ case *types.Error, *types.Done, *types.Cancelled:
for _, uid := range toFetch {
delete(store.pendingHeaders, uid)
}