fix(resolver): fix async context leak, gRPC error swallowing, add 48 tests

Fix async resolve goroutine using caller's cancelable context by
switching to context.WithoutCancel. Fix NewGRPCPlugin silently
returning broken resolver on connection failure. Fix "resolover"
typo in log field. Add doc comments to all exported symbols.
This commit is contained in:
ginuerzh
2026-05-25 20:52:19 +08:00
parent acce86c0e4
commit 28d3ffa310
7 changed files with 916 additions and 9 deletions
+2
View File
@@ -18,6 +18,7 @@ import (
"github.com/miekg/dns"
)
// Options holds configuration for an Exchanger.
type Options struct {
router chain.Router
tlsConfig *tls.Config
@@ -62,6 +63,7 @@ type Exchanger interface {
String() string
}
// exchanger implements DNS queries over UDP, TCP, TLS (DoT), or HTTPS (DoH).
type exchanger struct {
network string
addr string