Browse Source

fix: use the goprocess for closing

fixes #668
pull/669/head
Steven Allen 5 years ago
parent
commit
2f06021e0c
  1. 2
      p2p/host/basic/basic_host.go

2
p2p/host/basic/basic_host.go

@ -146,6 +146,7 @@ func NewHost(ctx context.Context, net network.Network, opts *HostOpts) (*BasicHo
if h.cmgr != nil {
h.cmgr.Close()
}
_ = h.emitters.evtLocalProtocolsUpdated.Close()
return h.Network().Close()
})
@ -746,7 +747,6 @@ func (h *BasicHost) AllAddrs() []ma.Multiaddr {
// Close shuts down the Host's services (network, etc).
func (h *BasicHost) Close() error {
_ = h.emitters.evtLocalProtocolsUpdated.Close()
return h.proc.Close()
}

Loading…
Cancel
Save