Skip to content

Commit

Permalink
尝试修复节点删除后仍可使用的BUG
Browse files Browse the repository at this point in the history
  • Loading branch information
wyx2685 committed Nov 20, 2023
1 parent c1f36bb commit 330f3b1
Showing 1 changed file with 2 additions and 5 deletions.
7 changes: 2 additions & 5 deletions api/panel/node.go
Original file line number Diff line number Diff line change
Expand Up @@ -128,7 +128,7 @@ func (c *Client) GetNodeInfo() (node *NodeInfo, err error) {
SetHeader("If-None-Match", c.nodeEtag).
Get(path)
if err = c.checkResponse(r, path, err); err != nil {
return
return nil, err
}
if r.StatusCode() == 304 {
return nil, nil
Expand Down Expand Up @@ -238,9 +238,7 @@ func (c *Client) GetNodeInfo() (node *NodeInfo, err error) {
}
case "dns":
var domains []string
for _, v := range matchs {
domains = append(domains, v)
}
domains = append(domains, matchs...)
if matchs[0] != "main" {
node.RawDNS.DNSMap[strconv.Itoa(i)] = map[string]interface{}{
"address": cm.Routes[i].ActionValue,
Expand All @@ -249,7 +247,6 @@ func (c *Client) GetNodeInfo() (node *NodeInfo, err error) {
} else {
dns := []byte(strings.Join(matchs[1:], ""))
node.RawDNS.DNSJson = dns
break
}
}
}
Expand Down

0 comments on commit 330f3b1

Please sign in to comment.