fix: tcp-ping
This commit is contained in:
+6
-3
@@ -39,14 +39,17 @@ func UpdateIP(useIPv6CountryCode bool, period uint32) {
|
||||
continue
|
||||
}
|
||||
if ipv4 == "" || ipv6 == "" {
|
||||
if ipv4 == "" {
|
||||
GeoQueryIP = ipv6
|
||||
} else {
|
||||
GeoQueryIP = ipv4
|
||||
}
|
||||
CachedIP = fmt.Sprintf("%s%s", ipv4, ipv6)
|
||||
} else {
|
||||
CachedIP = fmt.Sprintf("%s/%s", ipv4, ipv6)
|
||||
}
|
||||
|
||||
if !useIPv6CountryCode {
|
||||
GeoQueryIP = ipv4
|
||||
} else {
|
||||
if useIPv6CountryCode {
|
||||
GeoQueryIP = ipv6
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user