fix: init failed bar not close and total bar not wait

This commit is contained in:
M09Ic committed 2025-02-22 14:01:10 +08:00
1 parent 5d69edd858
commit 0e76657248
2 files changed
+3 -1

No files matched your search

+1 -1
View File
@@ -694,8 +694,8 @@ func (pool *BrutePool) doCheck() {
}
pool.isFallback.Store(true)
pool.fallback()
pool.Cancel()
pool.IsFailed = true
pool.Cancel()
return
}
+2
View File
@@ -204,6 +204,7 @@ func (r *Runner) Prepare(ctx context.Context) error {
brutePool.Statistor.Error = err.Error()
if !r.Force {
// 如果没开启force, init失败将会关闭pool
brutePool.Bar.Close()
brutePool.Close()
r.PrintStat(brutePool)
r.Done()
@@ -253,6 +254,7 @@ Loop:
}
}
r.bar.Wait()
r.poolwg.Wait()
r.outwg.Wait()
}