diff options
Diffstat (limited to 'static_pool.go')
-rw-r--r-- | static_pool.go | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/static_pool.go b/static_pool.go index 665be234..b043b022 100644 --- a/static_pool.go +++ b/static_pool.go @@ -149,6 +149,7 @@ func (p *StaticPool) allocateWorker() (w *Worker, err error) { if w.state.Value() == StateReady { return w, nil } else { + go p.replaceWorker(w, w.state.Value()) continue } default: @@ -165,6 +166,7 @@ func (p *StaticPool) allocateWorker() (w *Worker, err error) { if w.state.Value() == StateReady { return w, nil } else { + go p.replaceWorker(w, w.state.Value()) continue } } @@ -270,4 +272,4 @@ func (p *StaticPool) throw(event int, ctx interface{}) { if p.listener != nil { p.listener(event, ctx) } -}
\ No newline at end of file +} |