summaryrefslogtreecommitdiff
path: root/static_pool.go
diff options
context:
space:
mode:
authorValery Piashchynski <[email protected]>2020-11-17 16:25:35 +0300
committerValery Piashchynski <[email protected]>2020-11-17 16:25:35 +0300
commit3cbdd3d3e44b3b4e72565d666391e3b732950774 (patch)
tree7c60fafe1c33076631e39fe26be187c9ca359a3e /static_pool.go
parenta57d064407e2ed7f35dd591101b5d421c64605e1 (diff)
Get http working with new container
Diffstat (limited to 'static_pool.go')
-rwxr-xr-xstatic_pool.go3
1 files changed, 3 insertions, 0 deletions
diff --git a/static_pool.go b/static_pool.go
index 4e49b212..d5511018 100755
--- a/static_pool.go
+++ b/static_pool.go
@@ -54,6 +54,9 @@ type StaticPool struct {
// NewPool creates new worker pool and task multiplexer. StaticPool will initiate with one worker.
func NewPool(ctx context.Context, cmd func() *exec.Cmd, factory Factory, cfg PoolConfig, options ...PoolOptions) (Pool, error) {
const op = errors.Op("NewPool")
+ if factory == nil {
+ return nil, errors.E(op, errors.Str("no factory initialized"))
+ }
cfg.InitDefaults()
if cfg.Debug {