Skip to content

Commit

Permalink
Merge pull request #24 from eryajf/fix_ticker
Browse files Browse the repository at this point in the history
  • Loading branch information
eryajf authored Oct 28, 2024
2 parents f5ead1e + 9654ad1 commit b0d7db5
Show file tree
Hide file tree
Showing 7 changed files with 7 additions and 0 deletions.
1 change: 1 addition & 0 deletions pkg/cmd/root.go
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@ import (
"fmt"
"log"
"net/http"
_ "net/http/pprof"
"os"
"runtime"

Expand Down
1 change: 1 addition & 0 deletions pkg/provider/aliyun.go
Original file line number Diff line number Diff line change
Expand Up @@ -115,6 +115,7 @@ func (a *AliyunDNS) ListRecords() ([]Record, error) {
}
results := make(map[string][]*alidns.DescribeDomainRecordsResponseBodyDomainRecordsRecord)
ticker := time.NewTicker(100 * time.Millisecond)
defer ticker.Stop()
for _, domain := range domains {
wg.Add(1)
go func(domain string) {
Expand Down
1 change: 1 addition & 0 deletions pkg/provider/amazon.go
Original file line number Diff line number Diff line change
Expand Up @@ -66,6 +66,7 @@ func (a *AmazonDNS) ListDomains() ([]Domain, error) {
return nil, err
}
ticker := time.NewTicker(100 * time.Millisecond)
defer ticker.Stop()
for _, domain := range domains {
wg.Add(1)
go func(domain types.HostedZone) {
Expand Down
1 change: 1 addition & 0 deletions pkg/provider/cloudflare.go
Original file line number Diff line number Diff line change
Expand Up @@ -54,6 +54,7 @@ func (cf *CloudFlareDNS) ListDomains() ([]Domain, error) {
return nil, err
}
ticker := time.NewTicker(100 * time.Millisecond)
defer ticker.Stop()
for _, domain := range domains {
wg.Add(1)
go func(domain cloudflare.Zone) {
Expand Down
1 change: 1 addition & 0 deletions pkg/provider/dnsla.go
Original file line number Diff line number Diff line change
Expand Up @@ -100,6 +100,7 @@ func (d *DNSLaDNS) ListRecords() ([]Record, error) {
}
results := make(map[string][]dnsla.Record)
ticker := time.NewTicker(time.Second)
defer ticker.Stop()
for _, domain := range domains {
wg.Add(1)
go func(domainName, domainId string) {
Expand Down
1 change: 1 addition & 0 deletions pkg/provider/godaddy.go
Original file line number Diff line number Diff line change
Expand Up @@ -101,6 +101,7 @@ func (g *GodaddyDNS) ListRecords() ([]Record, error) {
}
results := make(map[string][]daddy.DNSRecord)
ticker := time.NewTicker(time.Second)
defer ticker.Stop()
for _, domain := range domains {
wg.Add(1)
go func(domain string) {
Expand Down
1 change: 1 addition & 0 deletions pkg/provider/tencent.go
Original file line number Diff line number Diff line change
Expand Up @@ -114,6 +114,7 @@ func (t *TencentCloudDNS) ListRecords() ([]Record, error) {
}
results := make(map[string][]*dnspod.RecordListItem)
ticker := time.NewTicker(100 * time.Millisecond)
defer ticker.Stop()
for _, domain := range domains {
wg.Add(1)
go func(domain string) {
Expand Down

0 comments on commit b0d7db5

Please sign in to comment.