Skip to content

Commit

Permalink
kafka panic: Check that error is non-nil before
Browse files Browse the repository at this point in the history
fixes #1764
  • Loading branch information
sparrc committed Sep 14, 2016
1 parent bc22309 commit 828278d
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion plugins/inputs/kafka_consumer/kafka_consumer.go
Original file line number Diff line number Diff line change
Expand Up @@ -128,7 +128,9 @@ func (k *Kafka) receiver() {
case <-k.done:
return
case err := <-k.errs:
log.Printf("Kafka Consumer Error: %s\n", err.Error())
if err != nil {
log.Printf("Kafka Consumer Error: %s\n", err)
}
case msg := <-k.in:
metrics, err := k.parser.Parse(msg.Value)
if err != nil {
Expand Down

0 comments on commit 828278d

Please sign in to comment.