@cryptotaxi247 / kubo / commits / 83716af89

fix(bitswap) shut down async

Brian Tiger Chow committed Nov 5, 2014 at 10:13 UTC 83716af8905ba59a209271b98a893ca1a80e8ca3
1 file changed +3 -5
exchange/bitswap/bitswap.go
+3 -5
@@ -32,11 +32,9 @@ func NetMessageSession(ctx context.Context, p peer.Peer,
32 notif := notifications.New()
33
34 go func() {
35 - for {
36 - select {
37 - case <-ctx.Done():
38 - notif.Shutdown()
39 - }
35 + select {
36 + case <-ctx.Done():
37 + notif.Shutdown()
38 }
39 }()
40