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:
Alexander Zielenski 2022-08-08 14:19:37 -07:00 committed by Kubernetes Publisher
parent 449817f7b5
commit 0f4a6cf319

View File

@ -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