continue on unsubscribe/deregister
This commit is contained in:
parent
8873e6ad08
commit
19be4ea2fd
@ -183,8 +183,10 @@ func (h *httpBroker) run(l net.Listener) {
|
|||||||
h.Lock()
|
h.Lock()
|
||||||
var subscribers []*httpSubscriber
|
var subscribers []*httpSubscriber
|
||||||
for _, sub := range h.subscribers[subscriber.topic] {
|
for _, sub := range h.subscribers[subscriber.topic] {
|
||||||
|
// deregister and skip forward
|
||||||
if sub.id == subscriber.id {
|
if sub.id == subscriber.id {
|
||||||
h.r.Deregister(sub.svc)
|
h.r.Deregister(sub.svc)
|
||||||
|
continue
|
||||||
}
|
}
|
||||||
subscribers = append(subscribers, sub)
|
subscribers = append(subscribers, sub)
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user