diff --git a/CHANGELOG.next.asciidoc b/CHANGELOG.next.asciidoc index 9f291d70b5af..d0ae454a5ee3 100644 --- a/CHANGELOG.next.asciidoc +++ b/CHANGELOG.next.asciidoc @@ -86,6 +86,7 @@ https://github.com/elastic/beats/compare/v8.7.1\...main[Check the HEAD diff] - Fix crash when processing forwarded logs missing a message. {issue}34705[34705] {pull}34865[34865] - Move repeated channel not found errors to debug level. {issue}35314[35314] {pull}35317[35317] +- Allow program termination when attempting to open an absent channel. {pull}35474[35474] *Functionbeat* diff --git a/winlogbeat/beater/eventlogger.go b/winlogbeat/beater/eventlogger.go index 2eedb4781568..1b24af15b53d 100644 --- a/winlogbeat/beater/eventlogger.go +++ b/winlogbeat/beater/eventlogger.go @@ -136,6 +136,12 @@ func (e *eventLogger) run( runLoop: for stop := false; !stop; { + select { + case <-done: + return + default: + } + err = api.Open(state) switch {