fix(bitswap) shutdown
License: MIT Signed-off-by: Brian Tiger Chow <brian@perfmode.com>
Brian Tiger Chow committed
Nov 20, 2014 at 23:23 UTC
72a0cc18cef7b80343366672dc38a3333884fc2e
1 file changed
+2
-4
exchange/bitswap/bitswap.go
+2
-4
@@ -31,10 +31,8 @@ func New(ctx context.Context, p peer.Peer,
31
32
notif := notifications.New()
33
go func() {
34
- select {
35
- case <-ctx.Done():
36
- notif.Shutdown()
37
- }
34
+ <-ctx.Done()
35
+ notif.Shutdown()
36
}()
37
38
bs := &bitswap{