Skip to content

Commit

Permalink
shutdown notifications engine when closing a bitswap session
Browse files Browse the repository at this point in the history
License: MIT
Signed-off-by: Jeromy <[email protected]>
  • Loading branch information
whyrusleeping committed Feb 4, 2018
1 parent 52301ce commit 0b80b2c
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions exchange/bitswap/session.go
Original file line number Diff line number Diff line change
Expand Up @@ -83,6 +83,7 @@ func (bs *Bitswap) NewSession(ctx context.Context) *Session {
}

func (bs *Bitswap) removeSession(s *Session) {
bs.notifications.Shutdown()
bs.sessLk.Lock()
defer bs.sessLk.Unlock()
for i := 0; i < len(bs.sessions); i++ {
Expand Down

0 comments on commit 0b80b2c

Please sign in to comment.