mirror of
https://github.com/Control-D-Inc/ctrld.git
synced 2026-04-07 12:32:04 +02:00
fix: declare ipv6Handler as dns.Handler to match wrapIPv6Handler return type
The handler variable is dns.HandlerFunc but wrapIPv6Handler returns dns.Handler (interface). Go's type inference picked dns.HandlerFunc for ipv6Handler, causing a compile error on assignment. Explicit type declaration fixes the mismatch.
This commit is contained in:
committed by
Cuong Manh Le
parent
22a796f673
commit
c55e2a722c
@@ -211,7 +211,7 @@ func (p *prog) serveDNS(listenerNum string) error {
|
||||
proto := proto
|
||||
if needLocalIPv6Listener(p.cfg.Service.InterceptMode) {
|
||||
g.Go(func() error {
|
||||
ipv6Handler := handler
|
||||
var ipv6Handler dns.Handler = handler
|
||||
if proto == "udp" {
|
||||
ipv6Handler = wrapIPv6Handler(handler)
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user