shutdown notifications engine when closing a bitswap session

License: MIT
Signed-off-by: Jeromy <jeromyj@gmail.com>
This commit is contained in:
Jeromy 2018-02-04 15:09:03 -08:00 committed by Steven Allen
parent 25eeb1e250
commit 82e1ff585f

View File

@ -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++ {