diff --git a/pool_func.go b/pool_func.go index c74eec8..7fcc9b6 100644 --- a/pool_func.go +++ b/pool_func.go @@ -173,7 +173,7 @@ func (p *PoolWithFunc) getWorker() *WorkerWithFunc { p.lock.Unlock() break } - } else { + } else if w == nil { wp := p.workerPool.Get() if wp == nil { w = &WorkerWithFunc{