From 1809c2431458f76d29c772475058671041bc9f5a Mon Sep 17 00:00:00 2001 From: Markus Lehtonen Date: Wed, 24 May 2023 16:51:48 +0300 Subject: [PATCH] nfd-master: use close for stop channel Simpler and more reliable (in case of multiple consumers) to just close the channel. --- pkg/nfd-master/nfd-master.go | 5 +---- 1 file changed, 1 insertion(+), 4 deletions(-) diff --git a/pkg/nfd-master/nfd-master.go b/pkg/nfd-master/nfd-master.go index 5eda86559c..98ef6689de 100644 --- a/pkg/nfd-master/nfd-master.go +++ b/pkg/nfd-master/nfd-master.go @@ -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.