mirror of
https://github.com/libp2p/go-libp2p.git
synced 2026-04-23 00:27:05 +08:00
@@ -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()
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user