Skip to content

Commit

Permalink
Close handle on signalEvent (#9838)
Browse files Browse the repository at this point in the history
Close handle on signalEvent. Winlogbeat doesn't use the signalEvent but it's required to create the subscription. Winlogbeat polls the subscription every second rather than selecting on the signalEvent.
  • Loading branch information
wenhaochen authored and andrewkroh committed Jan 4, 2019
1 parent 72b96a7 commit 5b1e4cd
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 0 deletions.
2 changes: 2 additions & 0 deletions CHANGELOG.next.asciidoc
Original file line number Diff line number Diff line change
Expand Up @@ -122,6 +122,8 @@ https://github.com/elastic/beats/compare/v7.0.0-alpha2...master[Check the HEAD d

*Winlogbeat*

- Close handle on signalEvent. {pull}9838[9838]

*Functionbeat*

==== Known Issue
Expand Down
1 change: 1 addition & 0 deletions winlogbeat/eventlog/wineventlog.go
Original file line number Diff line number Diff line change
Expand Up @@ -126,6 +126,7 @@ func (l *winEventLog) Open(state checkpoint.EventLogState) error {
if err != nil {
return nil
}
defer windows.CloseHandle(signalEvent)

debugf("%s using subscription query=%s", l.logPrefix, l.query)
subscriptionHandle, err := win.Subscribe(
Expand Down

0 comments on commit 5b1e4cd

Please sign in to comment.