mirror of
https://github.com/kubernetes/client-go.git
synced 2025-07-30 22:35:10 +00:00
reset listenersStarted
for correctness. technically shouldnt be an issue since restarting a stopped processor is not supported Kubernetes-commit: 3a81341cfa6f7e2ca1b9bfc195c567dcdfaa4dea
This commit is contained in:
parent
449817f7b5
commit
0f4a6cf319
4
tools/cache/shared_informer.go
vendored
4
tools/cache/shared_informer.go
vendored
@ -754,6 +754,10 @@ func (p *sharedProcessor) run(stopCh <-chan struct{}) {
|
||||
// Wipe out list of listeners since they are now closed
|
||||
// (processorListener cannot be re-used)
|
||||
p.listeners = nil
|
||||
|
||||
// Reset to false since there are nil listeners, also to block new listeners
|
||||
// that are added from being run now that the processor was stopped
|
||||
p.listenersStarted = false
|
||||
}()
|
||||
|
||||
p.wg.Wait() // Wait for all .pop() and .run() to stop
|
||||
|
Loading…
Reference in New Issue
Block a user