fix: use the goprocess for closing

fixes #668
This commit is contained in:
Steven Allen
2019-07-04 12:32:01 -07:00
parent fbe833de27
commit 2f06021e0c
+1 -1
View File
@@ -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()
}