@cryptotaxi247 / kubo / commits / b1155a0bb

fix(bitswap:notifications) close chan on Publish

Brian Tiger Chow committed Sep 12, 2014 at 02:44 UTC b1155a0bb6cd0369ec59044868b39b7ace1c547d
1 file changed +1 -1
bitswap/notifications.go
+1 -1
@@ -26,7 +26,7 @@ func (ps *notifications) Publish(block *blocks.Block) {
26 // |ctx| times out or is cancelled
27 func (ps *notifications) Subscribe(ctx context.Context, k u.Key) <-chan *blocks.Block {
28 topic := string(k)
29 - subChan := ps.wrapped.Sub(topic)
29 + subChan := ps.wrapped.SubOnce(topic)
30 blockChannel := make(chan *blocks.Block)
31 go func() {
32 defer close(blockChannel)