Commit 7c378126 authored by Brian Tiger Chow's avatar Brian Tiger Chow

style(bitswap:notifications) rm explicit returns

parent d294f7dc
...@@ -33,13 +33,11 @@ func (ps *notifications) Subscribe(ctx context.Context, k u.Key) <-chan *blocks. ...@@ -33,13 +33,11 @@ func (ps *notifications) Subscribe(ctx context.Context, k u.Key) <-chan *blocks.
select { select {
case val := <-subChan: case val := <-subChan:
block, ok := val.(*blocks.Block) block, ok := val.(*blocks.Block)
if !ok { if ok {
return blockChannel <- block
} }
blockChannel <- block
case <-ctx.Done(): case <-ctx.Done():
ps.wrapped.Unsub(subChan, topic) ps.wrapped.Unsub(subChan, topic)
return
} }
}() }()
return blockChannel return 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