Skip to content

Commit

Permalink
fix #775; correct size of separator
Browse files Browse the repository at this point in the history
  • Loading branch information
Alex Romanenko committed Jun 23, 2020
1 parent 7191f0b commit 46328d3
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions output_file.go
Original file line number Diff line number Diff line change
Expand Up @@ -226,9 +226,11 @@ func (o *FileOutput) Write(data []byte) (n int, err error) {
}

n, _ = o.writer.Write(data)
o.writer.Write([]byte(payloadSeparator))
nSeparator, _ := o.writer.Write([]byte(payloadSeparator))

o.totalFileSize += int64(n + len(payloadSeparator))
n += nSeparator

o.totalFileSize += int64(n)
o.queueLength++

if Settings.outputFileConfig.outputFileMaxSize > 0 && o.totalFileSize >= Settings.outputFileConfig.outputFileMaxSize {
Expand Down

0 comments on commit 46328d3

Please sign in to comment.