From 2a2e89726135d396342beb5f4cc2497007a42be0 Mon Sep 17 00:00:00 2001 From: Arsen6331 Date: Thu, 18 Aug 2022 22:01:12 +0000 Subject: [PATCH] Trim quotes from IP returned by espat's GetDNS() --- espat/tcp.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/espat/tcp.go b/espat/tcp.go index 94506ea..b2c87e5 100644 --- a/espat/tcp.go +++ b/espat/tcp.go @@ -29,7 +29,7 @@ func (d *Device) GetDNS(domain string) (string, error) { return "", errors.New("Invalid domain lookup result") } res := strings.Split(r[1], "\r\n") - return res[0], nil + return strings.Trim(res[0], `"`), nil } // ConnectTCPSocket creates a new TCP socket connection for the ESP8266/ESP32.