Merge pull request #83925 from BurtonQin/framework_leak

framework: Fix a goroutine leak bug in resource_usage_gatherer.go
This commit is contained in:
Kubernetes Prow Robot 2019-10-28 14:08:58 -07:00 committed by GitHub
commit ad47fe3962
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -345,7 +345,7 @@ func (g *ContainerResourceGatherer) StartGatheringData() {
func (g *ContainerResourceGatherer) StopAndSummarize(percentiles []int, constraints map[string]ResourceConstraint) (*ResourceUsageSummary, error) {
close(g.stopCh)
Logf("Closed stop channel. Waiting for %v workers", len(g.workers))
finished := make(chan struct{})
finished := make(chan struct{}, 1)
go func() {
g.workerWg.Wait()
finished <- struct{}{}