mirror of
https://github.com/mjl-/mox.git
synced 2024-12-27 08:53:48 +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
1 changed files with 6 additions and 0 deletions
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…
Reference in a new issue