mirror of https://github.com/0xERR0R/blocky.git
#162: Segmentation fault on TCP request with UDP fallback
This commit is contained in:
parent
a1458d4459
commit
b454a17c0b
|
@ -126,7 +126,7 @@ func (r *dnsUpstreamClient) callExternal(msg *dns.Msg,
|
|||
// try UDP as fallback
|
||||
var opErr *net.OpError
|
||||
if errors.As(err, &opErr) {
|
||||
if opErr.Op == "dial" {
|
||||
if opErr.Op == "dial" && r.udpClient != nil {
|
||||
return r.udpClient.Exchange(msg, upstreamURL)
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue