mirror of
https://github.com/mjl-/mox.git
synced 2024-12-27 08:53:48 +03:00
fix 3 cases of shadowed variables (other than "err")
2 of these were actual bugs.
This commit is contained in:
parent
5c33640aea
commit
c65731ac56
3 changed files with 5 additions and 4 deletions
|
@ -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
|
||||
}
|
||||
}
|
||||
|
|
|
@ -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,
|
||||
|
|
|
@ -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)
|
||||
|
|
Loading…
Reference in a new issue