Skip to content

Commit

Permalink
fix panic
Browse files Browse the repository at this point in the history
  • Loading branch information
kvch committed Jun 17, 2020
1 parent 4d68054 commit 7da05b6
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions libbeat/reader/multiline/counter.go
Original file line number Diff line number Diff line change
Expand Up @@ -34,9 +34,9 @@ func newMultilineCountReader(
maxBytes int,
config *Config,
) (reader.Reader, error) {
maxLines := *config.MaxLines
if maxLines == 0 {
maxLines = config.LinesCount
maxLines := config.LinesCount
if l := config.MaxLines; l != nil && 0 < *l {
maxLines = *l
}

return &counterReader{
Expand Down

0 comments on commit 7da05b6

Please sign in to comment.