diff options
author | Wolfy-J <[email protected]> | 2018-06-10 17:18:23 +0300 |
---|---|---|
committer | Wolfy-J <[email protected]> | 2018-06-10 17:18:23 +0300 |
commit | 094a4c211022b9446ef988c74c546ad6efb09722 (patch) | |
tree | 603ade627491960108154d6301868c9b881cd101 /static_pool.go | |
parent | 232aa8f3c20a060e556ab431467f4f7b3f83bfbf (diff) |
http service
Diffstat (limited to 'static_pool.go')
-rw-r--r-- | static_pool.go | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/static_pool.go b/static_pool.go index a4391005..a2d30679 100644 --- a/static_pool.go +++ b/static_pool.go @@ -161,8 +161,8 @@ func (p *StaticPool) allocateWorker() (w *Worker, err error) { // release releases or replaces the worker. func (p *StaticPool) release(w *Worker) { - if p.cfg.MaxExecutions != 0 && w.State().NumExecs() >= p.cfg.MaxExecutions { - go p.replaceWorker(w, p.cfg.MaxExecutions) + if p.cfg.MaxJobs != 0 && w.State().NumExecs() >= p.cfg.MaxJobs { + go p.replaceWorker(w, p.cfg.MaxJobs) return } |