Skip to content
This repository has been archived by the owner on Aug 23, 2023. It is now read-only.

Commit

Permalink
dont try and reuse byte slice when publishing
Browse files Browse the repository at this point in the history
  • Loading branch information
woodsaj committed Jan 10, 2017
1 parent 3b4cb2c commit a3eabf8
Showing 1 changed file with 1 addition and 2 deletions.
3 changes: 1 addition & 2 deletions cmd/mt-replicator/publish.go
Original file line number Diff line number Diff line change
Expand Up @@ -64,12 +64,11 @@ func (p *Publisher) Send(metrics []*schema.MetricData) error {
if len(metrics) == 0 {
return nil
}
var data []byte

payload := make([]*sarama.ProducerMessage, len(metrics))

for i, metric := range metrics {
data, err := metric.MarshalMsg(data[:0])
data, err := metric.MarshalMsg(nil)
if err != nil {
return err
}
Expand Down

0 comments on commit a3eabf8

Please sign in to comment.