Skip to content

Commit

Permalink
fix:多域名情况下,如果只配置一个RR,会因为检测条件不足导致另一个使用空字符串更新
Browse files Browse the repository at this point in the history
  • Loading branch information
qingchuwudi committed Feb 21, 2021
1 parent 076d8db commit 516829e
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions main.go
Original file line number Diff line number Diff line change
Expand Up @@ -66,13 +66,13 @@ func run(config *myConfig.Config, cli *alidns.Client) {

// 更新所有用户配置
for _, customer := range config.Customer {
if PubIPv4 != nil {
if (PubIPv4 != nil) && (customer.IPv4RR != "") {
err := updateDomains(cli, config, nil, customer.IPv4RR, customer.Domain, *PubIPv4, myConfig.IPv4Type, config.TTL)
if err != nil {
fmt.Printf("update IPv4 failed : %s\r\n", err.Error())
}
}
if PubIPv6 != nil {
if (PubIPv6 != nil) && (customer.IPv6RR != "") {
err := updateDomains(cli, config, nil, customer.IPv6RR, customer.Domain, *PubIPv6, myConfig.IPv6Type, config.TTL)
if err != nil {
fmt.Printf("update IPv6 failed : %s\r\n", err.Error())
Expand Down

0 comments on commit 516829e

Please sign in to comment.