• Kubernetes Submit Queue's avatar
    Merge pull request #44935 from yifan-gu/fix_poll · 2e7cc022
    Kubernetes Submit Queue authored
    Automatic merge from submit-queue (batch tested with PRs 44940, 44974, 44935)
    
    apimachinery/pkg/util/wait: Fix potential goroutine leak in pollInternal().
    
    **What this PR does / why we need it**:
    
    Without the change, the wait function wouldn't exit until the timeout
    happens, so if the timeout is set to a big value and the Poll() is run
    inside a loop, then the total goroutines will increase indefinitely.
    
    This PR fixes the issue by closing the stop channel to tell the wait function
    to exit immediately if condition is true or any error happens.
    2e7cc022
Name
Last commit
Last update
..
src/k8s.io Loading commit data...
README.md Loading commit data...
copy.sh Loading commit data...
godeps-json-updater.go Loading commit data...
prime-apimachinery.sh Loading commit data...