mirror of
https://github.com/chainreactors/spray.git
synced 2025-09-15 19:50:18 +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.isFallback.Store(true)
|
||||||
pool.fallback()
|
pool.fallback()
|
||||||
pool.Cancel()
|
|
||||||
pool.IsFailed = true
|
pool.IsFailed = true
|
||||||
|
pool.Cancel()
|
||||||
return
|
return
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -204,6 +204,7 @@ func (r *Runner) Prepare(ctx context.Context) error {
|
|||||||
brutePool.Statistor.Error = err.Error()
|
brutePool.Statistor.Error = err.Error()
|
||||||
if !r.Force {
|
if !r.Force {
|
||||||
// 如果没开启force, init失败将会关闭pool
|
// 如果没开启force, init失败将会关闭pool
|
||||||
|
brutePool.Bar.Close()
|
||||||
brutePool.Close()
|
brutePool.Close()
|
||||||
r.PrintStat(brutePool)
|
r.PrintStat(brutePool)
|
||||||
r.Done()
|
r.Done()
|
||||||
@ -253,6 +254,7 @@ Loop:
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
r.bar.Wait()
|
||||||
r.poolwg.Wait()
|
r.poolwg.Wait()
|
||||||
r.outwg.Wait()
|
r.outwg.Wait()
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user