mirror of
https://github.com/ipfs/kubo.git
synced 2026-03-10 02:40:11 +08:00
add warning comment about possibly leaked goroutines
This commit is contained in:
parent
8ed0f4b854
commit
5eb08c4473
@ -260,6 +260,9 @@ loop:
|
||||
select {
|
||||
case <-done:
|
||||
case <-ctx.Done():
|
||||
// NB: we may be abandoning goroutines here before they complete
|
||||
// this shouldnt be an issue because they will complete soon anyways
|
||||
// we just don't want their being slow to impact bitswap transfer speeds
|
||||
}
|
||||
return nil
|
||||
}
|
||||
@ -412,6 +415,9 @@ func (bs *Bitswap) wantNewBlocks(ctx context.Context, bkeys []u.Key) {
|
||||
select {
|
||||
case <-done:
|
||||
case <-ctx.Done():
|
||||
// NB: we may be abandoning goroutines here before they complete
|
||||
// this shouldnt be an issue because they will complete soon anyways
|
||||
// we just don't want their being slow to impact bitswap transfer speeds
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Loading…
Reference in New Issue
Block a user