summaryrefslogtreecommitdiff
path: root/pool.go
diff options
context:
space:
mode:
authorWolfy-J <[email protected]>2018-01-28 18:20:30 +0300
committerWolfy-J <[email protected]>2018-01-28 18:20:30 +0300
commit1e689bdd7a0c0cde85f47091afcee7f292c4cafd (patch)
tree10dd641a003875cc524d2f84cf4f9f19b43597b5 /pool.go
parent6551be42e3b1afb39c22a0702a70d02dabbb77d4 (diff)
cs
Diffstat (limited to 'pool.go')
-rw-r--r--pool.go4
1 files changed, 2 insertions, 2 deletions
diff --git a/pool.go b/pool.go
index 4c9f0b26..415c695e 100644
--- a/pool.go
+++ b/pool.go
@@ -95,7 +95,6 @@ func (p *Pool) Exec(rqs *Payload) (rsp *Payload, err error) {
return nil, errors.Wrap(err, "unable to allocate worker")
}
- //todo: timeout
rsp, err = w.Exec(rqs)
if err != nil {
@@ -165,6 +164,8 @@ func (p *Pool) replaceWorker(w *Worker, caused interface{}) {
go p.destroyWorker(w)
nw, _ := p.createWorker()
+
+ // if unable to create, retry ? or report error
p.free <- nw
}
@@ -207,7 +208,6 @@ func (p *Pool) createWorker() (*Worker, error) {
log.Println(err)
- //todo: automatic replace
}
}(w)