fix: ipv6 单栈机器上报位置
This commit is contained in:
parent
5e6e7e251e
commit
f837a6fdc8
@ -45,7 +45,7 @@ func UpdateIP(useIPv6CountryCode bool, period uint32) {
|
|||||||
CachedIP = fmt.Sprintf("%s/%s", ipv4, ipv6)
|
CachedIP = fmt.Sprintf("%s/%s", ipv4, ipv6)
|
||||||
}
|
}
|
||||||
|
|
||||||
if ipv6 != "" && useIPv6CountryCode {
|
if ipv6 != "" && (useIPv6CountryCode || ipv4 == "") {
|
||||||
GeoQueryIP = ipv6
|
GeoQueryIP = ipv6
|
||||||
} else {
|
} else {
|
||||||
GeoQueryIP = ipv4
|
GeoQueryIP = ipv4
|
||||||
|
Loading…
x
Reference in New Issue
Block a user