From 2f94cdd04c96b8e553536741e7a3d98dc0101914 Mon Sep 17 00:00:00 2001 From: Asim Aslam Date: Tue, 6 Dec 2016 20:35:00 +0000 Subject: [PATCH] fix double pointer for nats unmarshal --- nats.go | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/nats.go b/nats.go index dfea950..b7b26a6 100644 --- a/nats.go +++ b/nats.go @@ -117,11 +117,11 @@ func (n *nbroker) Subscribe(topic string, handler broker.Handler, opts ...broker } fn := func(msg *nats.Msg) { - var m *broker.Message + var m broker.Message if err := n.opts.Codec.Unmarshal(msg.Data, &m); err != nil { return } - handler(&publication{m: m, t: topic}) + handler(&publication{m: &m, t: topic}) } var sub *nats.Subscription