Skip to content

Commit

Permalink
close the subscription on shutdown.
Browse files Browse the repository at this point in the history
  • Loading branch information
raulk committed Jun 26, 2019
1 parent a2a6ae1 commit 1e75d6d
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions dht.go
Original file line number Diff line number Diff line change
Expand Up @@ -107,6 +107,9 @@ func New(ctx context.Context, h host.Host, options ...opts.Option) (*IpfsDHT, er
// remove ourselves from network notifs.
dht.host.Network().StopNotify((*subscriberNotifee)(dht))

if dht.subscriptions.evtPeerIdentification != nil {
_ = dht.subscriptions.evtPeerIdentification.Close()
}
return nil
})

Expand Down

0 comments on commit 1e75d6d

Please sign in to comment.