func (d *Discovery) CloseFindLANPeers() {
	if d.mdnsService != nil {
		d.mdnsService.Service.Close()
	}
}
CloseFindLANPeers close peers
package dht
import (
	"context"
	"errors"
	"fmt"
	"time"
	"github.com/33cn/chain33/system/p2p/dht/extension"
	p2pty "github.com/33cn/chain33/system/p2p/dht/types"
	"github.com/33cn/chain33/types"
	"github.com/libp2p/go-libp2p-core/host"
	"github.com/libp2p/go-libp2p-core/peer"
	"github.com/libp2p/go-libp2p-core/protocol"
	discovery "github.com/libp2p/go-libp2p-discovery"
	dht "github.com/libp2p/go-libp2p-kad-dht"
	kbt "github.com/libp2p/go-libp2p-kbucket"
)
const (
	dhtProtoID = "/%s-%d/kad/1.0.0"  
)
type Discovery struct {
	ctx              context.Context
	kademliaDHT      *dht.IpfsDHT
	RoutingDiscovery *discovery.RoutingDiscovery
	mdnsService      *extension.MDNS
	subCfg           *p2pty.P2PSubConfig
	bootstraps       []peer.AddrInfo
	host             host.Host
}
func InitDhtDiscovery(ctx context.Context, host host.Host, peersInfo []peer.AddrInfo, chainCfg *types.Chain33Config, subCfg *p2pty.P2PSubConfig) *Discovery {
	d := new(Discovery)
	kademliaDHT, err := dht.New(ctx, host, dht.V1ProtocolOverride(protocol.ID(fmt.Sprintf(dhtProtoID, chainCfg.GetTitle(), subCfg.Channel))), dht.BootstrapPeers(peersInfo...), dht.RoutingTableRefreshPeriod(time.Minute), dht.Mode(dht.ModeServer))
	if err != nil {
		panic(err)
	}
	d.kademliaDHT = kademliaDHT
	d.ctx = ctx
	d.bootstraps = peersInfo
	d.subCfg = subCfg
	d.host = host
	return d
}
func (d *Discovery) Start() {
	go initInnerPeers(d.host, d.bootstraps, d.subCfg)
	if err := d.kademliaDHT.Bootstrap(d.ctx); err != nil {
		log.Error("Bootstrap", "err", err.Error())
	}
	d.RoutingDiscovery = discovery.NewRoutingDiscovery(d.kademliaDHT)
}
func (d *Discovery) Close() error {
	if d.kademliaDHT != nil {
		return d.kademliaDHT.Close()
	}
	d.CloseFindLANPeers()
	return nil
}
func (d *Discovery) FindLANPeers(host host.Host, serviceTag string) (<-chan peer.AddrInfo, error) {
	mdns, err := extension.NewMDNS(d.ctx, host, serviceTag)
	if err != nil {
		return nil, err
	}
	d.mdnsService = mdns
	return d.mdnsService.PeerChan(), nil
}