fix dns handler panic

This commit is contained in:
ginuerzh
2024-01-08 21:20:56 +08:00
parent 262ac0e9a5
commit 936954ecf2
2 changed files with 13 additions and 2 deletions

View File

@ -71,7 +71,10 @@ func (h *dnsHandler) Init(md md.Metadata) (err error) {
for i, addr := range h.md.dns {
nodes = append(nodes, chain.NewNode(fmt.Sprintf("target-%d", i), addr))
}
h.hop = xhop.NewHop(xhop.NodeOption(nodes...))
h.hop = xhop.NewHop(
xhop.NodeOption(nodes...),
xhop.LoggerOption(log),
)
}
var nodes []*chain.Node