mirror of
https://github.com/mjl-/mox.git
synced 2025-06-28 09:38:15 +03:00
add missing account close, for retraining junk filter for an account with the retrain cli command
This commit is contained in:
parent
e3d0a3a001
commit
a92784b824
6
ctl.go
6
ctl.go
@ -619,6 +619,12 @@ func servectlcmd(ctx context.Context, ctl *ctl, shutdown func()) {
|
|||||||
account := ctl.xread()
|
account := ctl.xread()
|
||||||
acc, err := store.OpenAccount(account)
|
acc, err := store.OpenAccount(account)
|
||||||
ctl.xcheck(err, "open account")
|
ctl.xcheck(err, "open account")
|
||||||
|
defer func() {
|
||||||
|
if acc != nil {
|
||||||
|
err := acc.Close()
|
||||||
|
log.Check(err, "closing account after retraining")
|
||||||
|
}
|
||||||
|
}()
|
||||||
|
|
||||||
acc.WithWLock(func() {
|
acc.WithWLock(func() {
|
||||||
conf, _ := acc.Conf()
|
conf, _ := acc.Conf()
|
||||||
|
Loading…
x
Reference in New Issue
Block a user