diff --git a/pool.go b/pool.go index e7836e5..53471e2 100644 --- a/pool.go +++ b/pool.go @@ -148,6 +148,7 @@ func (p *Pool) Release() error { for i := range p.workers { p.workers[i] = nil } + p.workers = nil }) return nil } diff --git a/pool_func.go b/pool_func.go index 407651a..d99269f 100644 --- a/pool_func.go +++ b/pool_func.go @@ -153,6 +153,7 @@ func (p *PoolWithFunc) Release() error { for i := range p.workers { p.workers[i] = nil } + p.workers = nil }) return nil }