Skip to content

Commit

Permalink
Remove unnecessary for loop in beat.go
Browse files Browse the repository at this point in the history
  • Loading branch information
ruflin committed Jan 14, 2016
1 parent 2cb241d commit 2d5d214
Showing 1 changed file with 5 additions and 8 deletions.
13 changes: 5 additions & 8 deletions libbeat/beat/beat.go
Original file line number Diff line number Diff line change
Expand Up @@ -112,15 +112,12 @@ func Run(name string, version string, bt Beater) {
}()

// Waits until beats channel is closed
for {
select {
case <-b.exit:
b.Stop()
logp.Info("Exit beat completed")
return
}
select {
case <-b.exit:
b.Stop()
logp.Info("Exit beat completed")
return
}

}

func (b *Beat) Start() error {
Expand Down

0 comments on commit 2d5d214

Please sign in to comment.