mirror of
https://github.com/kubernetes-sigs/node-feature-discovery.git
synced 2025-03-17 05:48:21 +00:00
nfd-master: fix memory leak in nfd api-controller
Fixes a memory leak that happened when stopping (and then re-starting) the nfd api controller. The stop channel was not used properly which caused the underlying informer to keep on running.
This commit is contained in:
parent
5ca55cd35a
commit
68750347f2
1 changed files with 1 additions and 4 deletions
|
@ -123,10 +123,7 @@ func newNfdController(config *restclient.Config, nfdApiControllerOptions nfdApiC
|
|||
}
|
||||
|
||||
func (c *nfdController) stop() {
|
||||
select {
|
||||
case c.stopChan <- struct{}{}:
|
||||
default:
|
||||
}
|
||||
close(c.stopChan)
|
||||
}
|
||||
|
||||
func (c *nfdController) updateOneNode(typ string, obj metav1.Object) {
|
||||
|
|
Loading…
Add table
Reference in a new issue