From 643313a72a2f39c9dce9a243a63a0f2b7d5c0e13 Mon Sep 17 00:00:00 2001 From: "honwen.chan" Date: Sat, 11 Feb 2023 17:58:05 +0800 Subject: [PATCH] fix: if a new ddns --- main.go | 6 +----- 1 file changed, 1 insertion(+), 5 deletions(-) diff --git a/main.go b/main.go index 9439d42..e136787 100644 --- a/main.go +++ b/main.go @@ -147,11 +147,7 @@ func (ak *AccessKey) AddRecord(domain, rr, dmType, value string, ttl int) (err e func (ak *AccessKey) CheckAndUpdateRecord(rr, domain, ipaddr, recordType string, ttl int) (err error) { fulldomain := strings.Join([]string{rr, domain}, `.`) - resloved := reslove(fulldomain) - if len(resloved) == 0 { - return fmt.Errorf("domain[%s] reslove empty, PLZ check network", fulldomain) - } - if resloved == ipaddr { + if reslove(fulldomain) == ipaddr { return // Skip } targetCnt := 0