diff --git a/http/account.go b/http/account.go index 5437b50..3f4884b 100644 --- a/http/account.go +++ b/http/account.go @@ -149,7 +149,7 @@ func accountHandle(w http.ResponseWriter, r *http.Request) { } flusher.Flush() - ctx := r.Context() + cctx := r.Context() for { select { case e := <-l.Events: @@ -159,7 +159,7 @@ func accountHandle(w http.ResponseWriter, r *http.Request) { return } - case <-ctx.Done(): + case <-cctx.Done(): return } } diff --git a/http/import.go b/http/import.go index 0de4b88..c2f3fab 100644 --- a/http/import.go +++ b/http/import.go @@ -126,7 +126,7 @@ func importManage() { case e := <-importers.Events: s, ok := imports[e.Token] if !ok { - s := state{ + s = state{ MailboxCounts: map[string]int{}, Listeners: map[*importListener]struct{}{}, Cancel: e.Cancel, diff --git a/store/account.go b/store/account.go index 588f16d..d10f9bc 100644 --- a/store/account.go +++ b/store/account.go @@ -1165,7 +1165,8 @@ func (a *Account) RejectsRemove(log *mlog.Log, rejectsMailbox, messageID string) q := bstore.QueryTx[Message](tx) q.FilterNonzero(Message{MailboxID: mb.ID, MessageID: messageID}) - remove, err := q.List() + var err error + remove, err = q.List() xcheckf(err, "listing messages to remove") changes = a.xremoveMessages(log, tx, mb, remove)