1
0
Fork 0
mirror of https://github.com/kubernetes-sigs/node-feature-discovery.git synced 2024-12-14 11:57:51 +00:00

nfd-master: use close for stop channel

Simpler and more reliable (in case of multiple consumers) to just close
the channel.
This commit is contained in:
Markus Lehtonen 2023-05-24 16:51:48 +03:00
parent d28a02c5cd
commit 1809c24314

View file

@ -394,10 +394,7 @@ func (m *nfdMaster) Stop() {
m.nfdController.stop()
}
select {
case m.stop <- struct{}{}:
default:
}
close(m.stop)
}
// Wait until NfdMaster is able able to accept connections.