From 788e91a51ee4f715f021b42f33756c5e22340b85 Mon Sep 17 00:00:00 2001
From: Simon Zolin <s.zolin@adguard.com>
Date: Thu, 25 Apr 2019 15:37:10 +0300
Subject: [PATCH] * control: don't use custom resolver for tests

---
 helpers.go | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/helpers.go b/helpers.go
index 33cf7a62..f94b2007 100644
--- a/helpers.go
+++ b/helpers.go
@@ -318,7 +318,7 @@ func customDialContext(ctx context.Context, network, addr string) (net.Conn, err
 		Timeout: time.Minute * 5,
 	}
 
-	if net.ParseIP(host) != nil {
+	if net.ParseIP(host) != nil || config.DNS.Port == 0 {
 		con, err := dialer.DialContext(ctx, network, addr)
 		return con, err
 	}