fix(bitswap) shut down async

This commit is contained in:
Brian Tiger Chow 2014-11-05 10:13:24 -08:00
parent d742984968
commit 83716af890

View File

@ -32,11 +32,9 @@ func NetMessageSession(ctx context.Context, p peer.Peer,
notif := notifications.New()
go func() {
for {
select {
case <-ctx.Done():
notif.Shutdown()
}
select {
case <-ctx.Done():
notif.Shutdown()
}
}()