From 88eb8c5e368ae7c31065b807d0912b082353f789 Mon Sep 17 00:00:00 2001 From: lash Date: Wed, 14 Nov 2018 13:10:50 +0100 Subject: [PATCH] swarm/pss: Move topic handler cap add to unconditional add --- swarm/pss/pss.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/swarm/pss/pss.go b/swarm/pss/pss.go index e422850d33..6a84ab968f 100644 --- a/swarm/pss/pss.go +++ b/swarm/pss/pss.go @@ -322,10 +322,10 @@ func (p *Pss) Register(topic *Topic, hndlr *handler) func() { if handlers == nil { handlers = make(map[*handler]bool) p.handlers[*topic] = handlers - p.topicHandlerCaps[*topic] = hndlr.caps log.Debug("registered handler", "caps", hndlr.caps) } handlers[hndlr] = true + p.topicHandlerCaps[*topic] |= hndlr.caps return func() { p.deregister(topic, hndlr) } } func (p *Pss) deregister(topic *Topic, hndlr *handler) {