Fix panic on closing already closed channel

main
Max Ignatenko 2024-02-17 12:26:57 +00:00
parent 04d521f58c
commit 1d3c6edf0a
1 changed files with 1 additions and 0 deletions

View File

@ -78,6 +78,7 @@ func (p *WorkerPool) run(ctx context.Context) {
close(ch)
}
// also wait for all workers to stop?
return
case newSize := <-p.resize:
switch {
case newSize > len(p.workerSignals):