Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add missing calls to service.BeforeRun() and service.Cleanup() #1415

Merged
merged 1 commit into from
Apr 19, 2016
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions CHANGELOG.asciidoc
Original file line number Diff line number Diff line change
Expand Up @@ -38,6 +38,7 @@ https://github.com/elastic/beats/compare/v5.0.0-alpha1...master[Check the HEAD d
- Drain response buffers when pipelining is used by redis output. {pull}1353[1353]
- Unterminated environment variable expressions in config files will now cause an error {pull}1389[1389]
- Fix issue with the automatic template loading when Elasticsearch is not available on Beat start. {issue}1321[1321]
- Fix bug affecting -cpuprofile, -memprofile, and -httpprof CLI flags {pull}1415[1415]

*Packetbeat*

Expand Down
2 changes: 2 additions & 0 deletions libbeat/beat/beat.go
Original file line number Diff line number Diff line change
Expand Up @@ -262,6 +262,7 @@ func (bc *instance) run() error {
// reaches the setup stage.
func (bc *instance) cleanup() error {
logp.Info("%s cleanup", bc.data.Name)
defer svc.Cleanup()
return bc.beater.Cleanup(bc.data)
}

Expand Down Expand Up @@ -291,6 +292,7 @@ func (bc *instance) launch(exit bool) error {
return err
}

svc.BeforeRun()
svc.HandleSignals(bc.beater.Stop)
err = bc.run()
return err
Expand Down