Skip to content

Commit

Permalink
fix race on reuse msg
Browse files Browse the repository at this point in the history
  • Loading branch information
mehrdadrad committed Apr 5, 2017
1 parent 6079f22 commit 5ec8710
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion producer/nsq.go
Original file line number Diff line number Diff line change
Expand Up @@ -72,7 +72,7 @@ func (n *NSQ) inputMsg(topic string, mCh chan []byte, ec *uint64) {
break
}

err = n.producer.Publish(topic, msg)
err = n.producer.Publish(topic, append([]byte{}, msg...))
if err != nil {
n.logger.Println(err)
*ec++
Expand Down

0 comments on commit 5ec8710

Please sign in to comment.