1
0
Fork 0
mirror of https://github.com/kubernetes-sigs/node-feature-discovery.git synced 2025-03-28 02:37:11 +00:00

Merge pull request #1620 from ArangoGutierrez/tuleak

Use close to signal stop channedl in worker and topology-updater
This commit is contained in:
Kubernetes Prow Robot 2024-03-14 07:49:36 -07:00 committed by GitHub
commit e260c025b8
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
2 changed files with 2 additions and 8 deletions

View file

@ -218,10 +218,7 @@ func (w *nfdTopologyUpdater) Run() error {
// Stop NFD Topology Updater
func (w *nfdTopologyUpdater) Stop() {
select {
case w.stop <- struct{}{}:
default:
}
close(w.stop)
}
func (w *nfdTopologyUpdater) updateNodeResourceTopology(zoneInfo v1alpha2.ZoneList, scanResponse resourcemonitor.ScanResponse, readKubeletConfig bool) error {

View file

@ -303,10 +303,7 @@ func (w *nfdWorker) Run() error {
// Stop NfdWorker
func (w *nfdWorker) Stop() {
select {
case w.stop <- struct{}{}:
default:
}
close(w.stop)
}
// getGrpcClient returns client connection to the NFD gRPC server. It creates a