Commit b1155a0b authored by Brian Tiger Chow's avatar Brian Tiger Chow

fix(bitswap:notifications) close chan on Publish

parent 7c378126
......@@ -26,7 +26,7 @@ func (ps *notifications) Publish(block *blocks.Block) {
// |ctx| times out or is cancelled
func (ps *notifications) Subscribe(ctx context.Context, k u.Key) <-chan *blocks.Block {
topic := string(k)
subChan := ps.wrapped.Sub(topic)
subChan := ps.wrapped.SubOnce(topic)
blockChannel := make(chan *blocks.Block)
go func() {
defer close(blockChannel)
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment