reset listenersStarted

for correctness. technically shouldnt be an issue since restarting a stopped processor is not supported
This commit is contained in:
Alexander Zielenski 2022-08-08 14:19:37 -07:00
parent 8af0a31a15
commit 3a81341cfa
No known key found for this signature in database
GPG Key ID: 754BC11B447F7843

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