Skip to content

Commit

Permalink
fix: if a new ddns
Browse files Browse the repository at this point in the history
  • Loading branch information
honwen committed Feb 11, 2023
1 parent c59551b commit 643313a
Showing 1 changed file with 1 addition and 5 deletions.
6 changes: 1 addition & 5 deletions main.go
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down

0 comments on commit 643313a

Please sign in to comment.