Skip to content

Commit

Permalink
do not block on out channel if beat is stopped
Browse files Browse the repository at this point in the history
  • Loading branch information
kvch committed Oct 16, 2018
1 parent b0becab commit 2e11058
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion journalbeat/input/input.go
Original file line number Diff line number Diff line change
Expand Up @@ -178,7 +178,10 @@ func (i *Input) readEvents(wg *sync.WaitGroup, r *reader.Reader, out chan *beat.
continue
}

out <- event
select {
case <-i.done:
case out <- event:
}
}
}

Expand Down

0 comments on commit 2e11058

Please sign in to comment.