Fix panic on closing already closed channel
parent
04d521f58c
commit
1d3c6edf0a
|
@ -78,6 +78,7 @@ func (p *WorkerPool) run(ctx context.Context) {
|
||||||
close(ch)
|
close(ch)
|
||||||
}
|
}
|
||||||
// also wait for all workers to stop?
|
// also wait for all workers to stop?
|
||||||
|
return
|
||||||
case newSize := <-p.resize:
|
case newSize := <-p.resize:
|
||||||
switch {
|
switch {
|
||||||
case newSize > len(p.workerSignals):
|
case newSize > len(p.workerSignals):
|
||||||
|
|
Loading…
Reference in New Issue