mirror of
https://github.com/ipfs/kubo.git
synced 2026-02-26 04:47:45 +08:00
shutdown notifications engine when closing a bitswap session
License: MIT Signed-off-by: Jeromy <jeromyj@gmail.com>
This commit is contained in:
parent
25eeb1e250
commit
82e1ff585f
@ -83,6 +83,7 @@ func (bs *Bitswap) NewSession(ctx context.Context) *Session {
|
||||
}
|
||||
|
||||
func (bs *Bitswap) removeSession(s *Session) {
|
||||
s.notif.Shutdown()
|
||||
bs.sessLk.Lock()
|
||||
defer bs.sessLk.Unlock()
|
||||
for i := 0; i < len(bs.sessions); i++ {
|
||||
|
||||
Loading…
Reference in New Issue
Block a user