summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorWolfy-J <[email protected]>2021-01-07 22:23:12 +0300
committerWolfy-J <[email protected]>2021-01-07 22:23:12 +0300
commit14ecff0ba0e54a1ff73f140a76da58c1b3a20a6d (patch)
tree0ea3bcc5209829628042ab7095dcb9dcc7dc0fc0
parentcc3f80c2806271ce8b6887518a2974e52d71933f (diff)
- fixes listeners merge
-rw-r--r--plugins/server/plugin.go7
1 files changed, 5 insertions, 2 deletions
diff --git a/plugins/server/plugin.go b/plugins/server/plugin.go
index 613d84ed..cb7b08b8 100644
--- a/plugins/server/plugin.go
+++ b/plugins/server/plugin.go
@@ -131,8 +131,11 @@ func (server *Plugin) NewWorkerPool(ctx context.Context, opt poolImpl.Config, en
return nil, errors.E(op, err)
}
- list := make([]events.Listener, 0, len(listeners)+1)
- list = append(listeners, server.collectPoolLogs)
+ list := make([]events.Listener, 0, 1)
+ list = append(list, server.collectPoolLogs)
+ if len(listeners) != 0 {
+ list = append(list, listeners...)
+ }
p, err := poolImpl.Initialize(ctx, spawnCmd, server.factory, opt, poolImpl.AddListeners(list...))
if err != nil {