summaryrefslogtreecommitdiff
path: root/static_pool.go
diff options
context:
space:
mode:
Diffstat (limited to 'static_pool.go')
-rw-r--r--static_pool.go4
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
}