Skip to content

Commit

Permalink
Merge pull request elastic#225 from urso/fix/dont-send-empty-events
Browse files Browse the repository at this point in the history
make bulk publisher not send empty events
  • Loading branch information
ruflin committed Oct 28, 2015
2 parents 9cd69ac + 7053cd7 commit 79b6961
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion publisher/bulk.go
Original file line number Diff line number Diff line change
Expand Up @@ -62,7 +62,9 @@ func (b *bulkWorker) run() {
b.publish()
}
case <-b.flushTicker.C:
b.publish()
if len(b.events) > 0 {
b.publish()
}
}
}
}
Expand Down

0 comments on commit 79b6961

Please sign in to comment.