diff options
author | Valery Piashchynski <[email protected]> | 2021-07-11 10:11:22 +0300 |
---|---|---|
committer | Valery Piashchynski <[email protected]> | 2021-07-11 10:11:22 +0300 |
commit | 589f759cc2411319adbca2ece0dbe212407d1eba (patch) | |
tree | 2fbea4a6033d65813c41fd80f6339a524b46c9b2 /plugins/websockets/plugin.go | |
parent | cb2665d93ad7abe1ab30508ff0e2bd4d0bc379ea (diff) |
Update informer interface to return slice of pointers (do not over-copy
the Stat structure).
Make amqp Push concurrent safe.
Signed-off-by: Valery Piashchynski <[email protected]>
Diffstat (limited to 'plugins/websockets/plugin.go')
-rw-r--r-- | plugins/websockets/plugin.go | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/plugins/websockets/plugin.go b/plugins/websockets/plugin.go index 5925a588..4420916c 100644 --- a/plugins/websockets/plugin.go +++ b/plugins/websockets/plugin.go @@ -240,13 +240,13 @@ func (p *Plugin) Middleware(next http.Handler) http.Handler { } // Workers returns slice with the process states for the workers -func (p *Plugin) Workers() []process.State { +func (p *Plugin) Workers() []*process.State { p.RLock() defer p.RUnlock() workers := p.workers() - ps := make([]process.State, 0, len(workers)) + ps := make([]*process.State, 0, len(workers)) for i := 0; i < len(workers); i++ { state, err := process.WorkerProcessState(workers[i]) if err != nil { |