Skip to content

Commit

Permalink
Merge pull request #5187 from rwese/improve-dns_anx-performance
Browse files Browse the repository at this point in the history
improve performance and memory usage for dns_anx
  • Loading branch information
Neilpang authored Sep 13, 2024
2 parents adff28d + 8958653 commit fc4dba4
Showing 1 changed file with 1 addition and 2 deletions.
3 changes: 1 addition & 2 deletions dnsapi/dns_anx.sh
Original file line number Diff line number Diff line change
Expand Up @@ -130,8 +130,6 @@ _get_root() {
i=1
p=1

_anx_rest GET "zone.json"

while true; do
h=$(printf "%s" "$domain" | cut -d . -f $i-100)
_debug h "$h"
Expand All @@ -140,6 +138,7 @@ _get_root() {
return 1
fi

_anx_rest GET "zone.json/${h}"
if _contains "$response" "\"name\":\"$h\""; then
_sub_domain=$(printf "%s" "$domain" | cut -d . -f 1-$p)
_domain=$h
Expand Down

0 comments on commit fc4dba4

Please sign in to comment.