From 3cbdd3d3e44b3b4e72565d666391e3b732950774 Mon Sep 17 00:00:00 2001 From: Valery Piashchynski Date: Tue, 17 Nov 2020 16:25:35 +0300 Subject: Get http working with new container --- static_pool.go | 3 +++ 1 file changed, 3 insertions(+) (limited to 'static_pool.go') 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 { -- cgit v1.2.3