fix: ipv6 单栈机器上报位置

This commit is contained in:
naiba 2024-07-29 10:10:43 +08:00
parent 5e6e7e251e
commit f837a6fdc8

View File

@ -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