From 9f6199c243a2b21c9f182825e0033f46d42cea1d Mon Sep 17 00:00:00 2001 From: M09Ic Date: Fri, 11 Nov 2022 10:37:30 +0800 Subject: [PATCH] =?UTF-8?q?=E4=BF=AE=E5=A4=8Dcheck=E8=BF=87=E4=BA=8E?= =?UTF-8?q?=E9=A2=91=E7=B9=81=E7=9A=84bug?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- internal/pool.go | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/internal/pool.go b/internal/pool.go index 87941e8..efc5b2a 100644 --- a/internal/pool.go +++ b/internal/pool.go @@ -127,7 +127,7 @@ func NewPool(ctx context.Context, config *pkg.Config) (*Pool, error) { case WordSource: // 异步进行性能消耗较大的深度对比 pool.tempCh <- bl - + pool.reqCount++ if pool.reqCount%pool.checkPeriod == 0 { pool.reqCount++ go pool.check() @@ -236,7 +236,6 @@ Loop: if u == "" { continue } - p.reqCount++ p.wg.Add(1) _ = p.pool.Invoke(newUnit(u, WordSource)) case <-ctx.Done(): @@ -323,7 +322,7 @@ func (p *Pool) PutToFuzzy(bl *pkg.Baseline) { } func (p *Pool) resetFailed() { - p.failedCount = 0 + p.failedCount = 1 p.failedBaselines = nil }