mirror of
https://github.com/k3s-io/kubernetes.git
synced 2025-07-23 19:56:01 +00:00
Merge pull request #83925 from BurtonQin/framework_leak
framework: Fix a goroutine leak bug in resource_usage_gatherer.go
This commit is contained in:
commit
ad47fe3962
@ -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{}{}
|
||||
|
Loading…
Reference in New Issue
Block a user