mirror of
https://github.com/chainreactors/spray.git
synced 2026-10-28 19:40:49 +00:00
fix: init failed bar not close and total bar not wait
This commit is contained in:
1 parent
5d69edd858
commit
0e76657248
2 files changed
+3
-1
No files matched your search
@@ -694,8 +694,8 @@ func (pool *BrutePool) doCheck() {
|
||||
}
|
||||
pool.isFallback.Store(true)
|
||||
pool.fallback()
|
||||
pool.Cancel()
|
||||
pool.IsFailed = true
|
||||
pool.Cancel()
|
||||
return
|
||||
}
|
||||
|
||||
|
||||
@@ -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()
|
||||
}
|
||||
|
||||
Reference in new issue
Block a user