diff options
author | Valery Piashchynski <[email protected]> | 2021-01-07 22:36:10 +0300 |
---|---|---|
committer | GitHub <[email protected]> | 2021-01-07 22:36:10 +0300 |
commit | 033df4f423ddb25afd9d922acbe1fe077b3dc230 (patch) | |
tree | 3a850f8c0a05d4bfa4af2a2eb82347b6da19fb42 /plugins/server | |
parent | ac71c41bec81fcb457e2ad18f4cbaa3f4b99d6c4 (diff) | |
parent | 14ecff0ba0e54a1ff73f140a76da58c1b3a20a6d (diff) |
Merge pull request #470 from spiral/bugfix/missed-pool-events
[RR2] Bugfix/missed pool events
Diffstat (limited to 'plugins/server')
-rw-r--r-- | plugins/server/plugin.go | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/plugins/server/plugin.go b/plugins/server/plugin.go index 8a843723..8d8a7694 100644 --- a/plugins/server/plugin.go +++ b/plugins/server/plugin.go @@ -134,8 +134,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)) + 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 { |