Merge branch 'develop'

This commit is contained in:
andy pan 2018-06-22 11:42:17 +08:00
commit afc0d406f8
2 changed files with 6 additions and 0 deletions

View File

@ -106,6 +106,9 @@ func (p *Pool) Release() error {
for i := 0; i < running; i++ { for i := 0; i < running; i++ {
p.getWorker().stop() p.getWorker().stop()
} }
for i := range p.workers{
p.workers[i] = nil
}
}) })
return nil return nil
} }

View File

@ -111,6 +111,9 @@ func (p *PoolWithFunc) Release() error {
for i := 0; i < running; i++ { for i := 0; i < running; i++ {
p.getWorker().stop() p.getWorker().stop()
} }
for i := range p.workers{
p.workers[i] = nil
}
}) })
return nil return nil
} }