Skip to content

Commit

Permalink
nfd-master: use close for stop channel
Browse files Browse the repository at this point in the history
Simpler and more reliable (in case of multiple consumers) to just close
the channel.
  • Loading branch information
marquiz committed May 24, 2023
1 parent d28a02c commit 1809c24
Showing 1 changed file with 1 addition and 4 deletions.
5 changes: 1 addition & 4 deletions pkg/nfd-master/nfd-master.go
Original file line number Diff line number Diff line change
Expand Up @@ -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.
Expand Down

0 comments on commit 1809c24

Please sign in to comment.