From 19be4ea2fdcf3153fd97092a377c5cccf6afdd5d Mon Sep 17 00:00:00 2001 From: Asim Date: Mon, 21 Nov 2016 16:51:30 +0100 Subject: [PATCH] continue on unsubscribe/deregister --- broker/http_broker.go | 2 ++ 1 file changed, 2 insertions(+) diff --git a/broker/http_broker.go b/broker/http_broker.go index 09b8aa0a..d135683c 100644 --- a/broker/http_broker.go +++ b/broker/http_broker.go @@ -183,8 +183,10 @@ func (h *httpBroker) run(l net.Listener) { h.Lock() var subscribers []*httpSubscriber for _, sub := range h.subscribers[subscriber.topic] { + // deregister and skip forward if sub.id == subscriber.id { h.r.Deregister(sub.svc) + continue } subscribers = append(subscribers, sub) }