提交 83716af8 作者: Brian Tiger Chow

fix(bitswap) shut down async

上级 d7429849
...@@ -32,12 +32,10 @@ func NetMessageSession(ctx context.Context, p peer.Peer, ...@@ -32,12 +32,10 @@ func NetMessageSession(ctx context.Context, p peer.Peer,
notif := notifications.New() notif := notifications.New()
go func() { go func() {
for {
select { select {
case <-ctx.Done(): case <-ctx.Done():
notif.Shutdown() notif.Shutdown()
} }
}
}() }()
bs := &bitswap{ bs := &bitswap{
......
Markdown 格式
0%
您添加了 0 到此讨论。请谨慎行事。
请先完成此评论的编辑!
注册 或者 后发表评论