From 67efb37d0642a595d12b1b84c577207a5b485234 Mon Sep 17 00:00:00 2001 From: Dieter Plaetinck Date: Thu, 16 Feb 2017 12:37:08 +0100 Subject: [PATCH] make it build --- route/kafkamdm.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/route/kafkamdm.go b/route/kafkamdm.go index 3689c4c7..be6aa45f 100644 --- a/route/kafkamdm.go +++ b/route/kafkamdm.go @@ -110,6 +110,7 @@ func (r *KafkaMdm) run() { metrics := make([]*schema.MetricData, 0, r.flushMaxNum) ticker := time.NewTicker(r.flushMaxWait) brokers := []string{r.broker} + var err error for r.producer == nil { r.producer, err = sarama.NewSyncProducer(brokers, r.saramaCfg) @@ -127,7 +128,6 @@ func (r *KafkaMdm) run() { flush := func() { for { pre := time.Now() - var err error size := 0 payload := make([]*sarama.ProducerMessage, len(metrics))