diff --git a/dnscrypt-proxy/dnscrypt_certs.go b/dnscrypt-proxy/dnscrypt_certs.go index a30c2955..0d77b766 100644 --- a/dnscrypt-proxy/dnscrypt_certs.go +++ b/dnscrypt-proxy/dnscrypt_certs.go @@ -249,7 +249,7 @@ func _dnsExchange(proxy *Proxy, proto string, query *dns.Msg, serverAddress stri return nil, 0, err } upstreamAddr := tcpAddr - if relayUDPAddr != nil { + if relayTCPAddr != nil { proxy.prepareForRelay(tcpAddr.IP, tcpAddr.Port, &binQuery) upstreamAddr = relayTCPAddr }