diff --git a/pubsub/publisher.go b/pubsub/publisher.go index f017262..534b74a 100644 --- a/pubsub/publisher.go +++ b/pubsub/publisher.go @@ -68,6 +68,7 @@ func (p *Publisher) Publish(v interface{}) { func (p *Publisher) Close() { p.m.Lock() for sub := range p.subscribers { + delete(p.subscribers, sub) close(sub) } p.m.Unlock()