Skip to content

Commit

Permalink
fix: ipv6 单栈机器上报位置
Browse files Browse the repository at this point in the history
  • Loading branch information
naiba committed Jul 29, 2024
1 parent 5e6e7e2 commit f837a6f
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion pkg/monitor/myip.go
Original file line number Diff line number Diff line change
Expand Up @@ -45,7 +45,7 @@ func UpdateIP(useIPv6CountryCode bool, period uint32) {
CachedIP = fmt.Sprintf("%s/%s", ipv4, ipv6)
}

if ipv6 != "" && useIPv6CountryCode {
if ipv6 != "" && (useIPv6CountryCode || ipv4 == "") {
GeoQueryIP = ipv6
} else {
GeoQueryIP = ipv4
Expand Down

0 comments on commit f837a6f

Please sign in to comment.