MCPcopy Create free account
hub / github.com/chainreactors/spray / Close

Method Close

core/pool/brutepool.go:896–912  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

894}
895
896func (pool *BrutePool) Close() {
897 pool.Cancel()
898 // drain additionCh: Run 主循环退出后可能还有未消费的 addition item,
899 // 每个都持有 wg.Add(1), 必须 Done 掉否则 wg.Wait 永远阻塞.
900 go func() {
901 for range pool.additionCh {
902 pool.wg.Done()
903 }
904 }()
905 pool.wg.Wait()
906 close(pool.additionCh)
907 pool.reqPool.Release()
908 pool.scopePool.Release()
909 close(pool.processCh)
910 <-pool.handlerDone
911 pool.Statistor.EndTime = time.Now().Unix()
912}
913
914func (pool *BrutePool) safePath(u string) string {
915 // 自动生成的目录将采用safepath的方式拼接到相对目录中, 避免出现//的情况. 例如init, check, common

Callers 3

RunWithBruteMethod · 0.95
RunMethod · 0.95
BodyMethod · 0.45

Calls 1

DoneMethod · 0.45

Tested by

no test coverage detected