mirror of
https://github.com/ipfs/kubo.git
synced 2026-03-10 18:57:57 +08:00
fix(bitswap) shut down async
This commit is contained in:
parent
d742984968
commit
83716af890
@ -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()
|
||||
}
|
||||
}()
|
||||
|
||||
|
||||
Loading…
Reference in New Issue
Block a user