diff options
author | Valery Piashchynski <[email protected]> | 2021-08-03 13:36:31 +0300 |
---|---|---|
committer | Valery Piashchynski <[email protected]> | 2021-08-03 13:36:31 +0300 |
commit | 606e2170ccac5a13a11198aaf54e4219a83291ab (patch) | |
tree | 6eeb30453e7a1582f339e78772d639f00115221c /pkg/pool/supervisor_pool.go | |
parent | 31752d8bd20294c7d52cd3612fbf18e44ce42637 (diff) |
In a rare cases, when user set small timeout to allocate a worker,
spawned goroutine might stuck on the channel send operation and leak
memory.
Signed-off-by: Valery Piashchynski <[email protected]>
Diffstat (limited to 'pkg/pool/supervisor_pool.go')
-rwxr-xr-x | pkg/pool/supervisor_pool.go | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/pkg/pool/supervisor_pool.go b/pkg/pool/supervisor_pool.go index cbb7ad7b..bdaeade1 100755 --- a/pkg/pool/supervisor_pool.go +++ b/pkg/pool/supervisor_pool.go @@ -221,7 +221,7 @@ func (sp *supervised) control() { //nolint:gocognit workers[i].State().Set(worker.StateInvalid) _ = workers[i].Stop() } - // just to double check + // just to double-check workers[i].State().Set(worker.StateInvalid) sp.events.Push(events.PoolEvent{Event: events.EventIdleTTL, Payload: workers[i]}) } |