mirror of
https://github.com/chainreactors/spray.git
synced 2025-05-05 10:16:54 +00:00
fix: init failed bar not close and total bar not wait
This commit is contained in:
parent
5f8f5c7795
commit
286710f5ec
@ -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()
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user