Skip to content

Commit

Permalink
Add missing calls to service.BeforeRun() and service.Cleanup(). (#1415)
Browse files Browse the repository at this point in the history
They were dropped during the refactor in #1249.
  • Loading branch information
andrewkroh authored and ruflin committed Apr 19, 2016
1 parent 5300dd5 commit a0f543d
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 0 deletions.
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

0 comments on commit a0f543d

Please sign in to comment.